tfr.utils.reshape_first_ndims

Stay organized with collections Save and categorize content based on your preferences.

Reshapes the first n dims of the input tensor to new shape.

tensor The input Tensor.
first_ndims A int denoting the first n dims.
new_shape A list of int representing the new shape.

A reshaped Tensor.