message: Pulled `RefVariable.load` to `Variable`
  `load` can be fully-defined in terms of other `Variable` methods.
  This change also removes the need to define both `get_shape` and
  `shape` in `Variable` implementations.
diff: @@ -896,7 +896,15 @@ class Variable(six.with_metaclass(VariableMetaclass,
  Raises:
  ValueError: Session is not passed and no default session
  """
  - raise NotImplementedError
  + if context.executing_eagerly():
  + self.assign(value)
  + else:
  + session = session or ops.get_default_session()
  + if session is None:
  + raise ValueError(
  + "Either session argument should be provided or default session "
  + "should be established")
  + session.run(self.initializer, {self.initializer.inputs[1]: value})
  # Conversion to tensor.
  @staticmethod
  @@ -1013,8 +1021,8 @@ class Variable(six.with_metaclass(VariableMetaclass,
  raise NotImplementedError
  def get_shape(self):
  - """Alias of Variable.shape."""
  - raise NotImplementedError
  + """Alias of `Variable.shape`."""
  + return self.shape
  def to_proto(self, export_scope=None):
  """Converts a `Variable` to a `VariableDef` protocol buffer.
  @@ -2122,49 +2130,6 @@ class RefVariable(VariableV1):
  """
  return state_ops.count_up_to(self._variable, limit=limit)
  - def load(self, value, session=None):
  - """Load new value into this variable.
  -
  - Writes new value to variable's memory. Doesn't add ops to the graph.
  -
  - This convenience method requires a session where the graph
  - containing this variable has been launched. If no session is
  - passed, the default session is used. See `tf.Session` for more
  - information on launching a graph and on sessions.
  -
  - ```python
  - v = tf.Variable([1, 2])
  - init = tf.global_variables_initializer()
  -
  - with tf.Session() as sess:
  - sess.run(init)
  - # Usage passing the session explicitly.
  - v.load([2, 3], sess)
  - print(v.eval(sess)) # prints [2 3]
  - # Usage with the default session. The 'with' block
  - # above makes 'sess' the default session.
  - v.load([3, 4], sess)
  - print(v.eval()) # prints [3 4]
  - ```
  -
  - Args:
  - value: New variable value
  - session: The session to use to evaluate this variable. If
  - none, the default session is used.
  -
  - Raises:
  - ValueError: Session is not passed and no default session
  - """
  - if context.executing_eagerly():
  - self.assign(value)
  - else:
  - session = session or ops.get_default_session()
  - if session is None:
  - raise ValueError(
  - "Either session argument should be provided or default session "
  - "should be established")
  - session.run(self._initializer_op, {self._initializer_op.inputs[1]: value})
  -
  # Conversion to tensor.
  @staticmethod
  def _TensorConversionFunction(v, dtype=None, name=None, as_ref=False): # pylint: disable=invalid-name
  @@ -2355,10 +2320,6 @@ class RefVariable(VariableV1):
  """
  return self._variable.get_shape()
  - def get_shape(self):
  - """Alias of Variable.shape."""
  - return self.shape
  -
  def to_proto(self, export_scope=None):
  """Converts a `Variable` to a `VariableDef` protocol buffer.
  