the tensorflow 1.8.0 seems to have disabled this operation, it suggest to use the set_shape function:
o._shape = tf.TensorShape(new_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 434, in _shape
"Tensor._shape cannot be assigned, use Tensor.set_shape instead.")
ValueError: Tensor._shape cannot be assigned, use Tensor.set_shape instead
but when I use the set_shape function I found the tensor shape is not changed.
I print this:
the tensorflow 1.8.0 seems to have disabled this operation, it suggest to use the set_shape function:
but when I use the set_shape function I found the tensor shape is not changed. I print this:
the output shows the tensor shape is not changed by this function: