Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tf_agents.utils.composite.squeeze

View source on GitHub

Squeeze composite tensor along axis axis.

tf_agents.utils.composite.squeeze(
    t, axis
)

Args:

  • t: A Tensor or SparseTensor.
  • axis: A python integer.

Returns:

The tensor with dimension axis removed.

Raises:

  • InvalidArgumentError: If t is a SparseTensor and has more than one index stored along axis.