neuralmonkey.checking module¶
API checking module.
This module serves as a library of API checks used as assertions during constructing the computational graph.
-
exception
neuralmonkey.checking.
CheckingException
¶ Bases:
Exception
-
neuralmonkey.checking.
assert_same_shape
(tensor_a: tensorflow.python.framework.ops.Tensor, tensor_b: tensorflow.python.framework.ops.Tensor) → None¶ Check if two tensors have the same shape.
-
neuralmonkey.checking.
assert_shape
(tensor: tensorflow.python.framework.ops.Tensor, expected_shape: List[Union[int, NoneType]]) → None¶ Check shape of a tensor.
Parameters: - tensor – Tensor to be chcecked.
- expected_shape – Expected shape where None means the same as in TF and -1 means not checking the dimension.
-
neuralmonkey.checking.
check_dataset_and_coders
(dataset: neuralmonkey.dataset.Dataset, runners: Iterable[neuralmonkey.runners.base_runner.BaseRunner]) → None¶