View source on GitHub |
Add a new dimension to tensor t
along axis
.
tf_agents.utils.composite.expand_dims(
t, axis
)
Args | |
---|---|
t
|
A tf.Tensor or tf.SparseTensor .
|
axis
|
A 0D integer scalar.
|
Returns | |
---|---|
An expanded tensor. |
Raises | |
---|---|
NotImplementedError
|
If t is a SparseTensor and axis != 0 .
|