Automated rollback of commit 0e8d6b4bea. Revert #30380.

PiperOrigin-RevId: 262023152
This commit is contained in:
A. Unique TensorFlower 2019-08-06 16:43:19 -07:00 committed by TensorFlower Gardener
parent afb7b97372
commit 5f30d1a31a

View File

@ -580,12 +580,6 @@ class Flatten(Layer):
permutation.append(1)
inputs = array_ops.transpose(inputs, perm=permutation)
input_shape = inputs.shape
if input_shape[1:].is_fully_defined():
flattened_dim = tensor_shape.dimension_value(
np.prod(input_shape[1:], dtype=int))
outputs = array_ops.reshape(inputs, (-1, flattened_dim))
else:
outputs = array_ops.reshape(
inputs, (tensor_shape.dimension_value(inputs.shape[0]) or
array_ops.shape(inputs)[0], -1))