tf_agents.utils.nest_utils.assert_matching_dtypes_and_inner_shapes

Returns True if tensors and specs have matching dtypes and inner shapes.

tensors_or_specs A nest of Tensor like or tf.TypeSpec 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.

ValueError If the tensors do not match the specs' dtypes or their inner shapes do not match the specs' shapes.