Returns True
if tensors and specs have matching dtypes and inner shapes.
tf_agents.utils.nest_utils.assert_matching_dtypes_and_inner_shapes(
tensors, specs, caller, tensors_name, specs_name, allow_extra_fields=False
)
Args |
tensors
|
A nest of tensor objects.
|
specs
|
A nest of tf.TypeSpec objects.
|
caller
|
The object calling assert... .
|
tensors_name
|
(str) Name to use for the tensors in case of an error.
|
specs_name
|
(str) Name to use for the specs in case of an error.
|
allow_extra_fields
|
If True , then tensors may contain more keys or list
fields than strictly required by specs .
|
Raises |
ValueError
|
If the tensors do not match the specs' dtypes or their inner
shapes do not match the specs' shapes.
|