validate_group_ndims_arg

tfsnippet.utils.validate_group_ndims_arg(group_ndims, name=None)

Validate the specified value for group_ndims argument.

If the specified group_ndims is a dynamic Tensor, additional assertion will be added to the graph node of group_ndims.

Parameters:
  • group_ndims – Object to be validated.
  • name – TensorFlow name scope of the graph nodes. (default “validate_group_ndims”)
Returns:

The validated group_ndims.

Return type:

tf.Tensor or int

Raises:

ValueError – If the specified group_ndims cannot pass validation.