Commit cea2e9c4 authored by Sergei Lebedev's avatar Sergei Lebedev Committed by TensorFlower Gardener
Browse files

Removed set_shape overrides from ResourceVariable subclasses.

These are essentially no-ops and allow for reads returning tensors inconsistent
with variable shape:

    >>> import tensorflow as tf
    >>> tf.enable_eager_execution()
    >>> v = tf.Variable(0)
    >>> t = v.assign(42)
    >>> t.set_shape((100500, ))
    >>> t.shape
    (100500, )
    >>> tf.convert_to_tensor(t)
    <tf.Tensor: id=9, shape=(), dtype=int32, numpy=42>

PiperOrigin-RevId: 227903155
parent 1ddce901
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment