Module

Transformations

Methods

# inner reshapeTensor(tensor, shape) → {Tensor}

Reshapes a tf.Tensor to a given shape.
Parameters:
Name Type Description
tensor Tensor The tensor to be squeezed.
shape Array.<Number> An array of integers defining the output tensor shape.

View Source

tf.reshape(tensor, shape).
Tensor

# inner squeezeTensor(tensor, axis) → {Tensor}

Removes dimensions of size 1 from the shape of a tf.Tensor.
Parameters:
Name Type Description
tensor Tensor The input tensor to be squeezed.
axis Array.<Number> An optional list of numbers. If specified, only squeezes the dimensions listed. The dimension index starts at 0. It is an error to squeeze a dimension that is not 1.

View Source

tf.squeeze(tensor, axis).
Tensor