message: Fast-path zeros and ones for backprop
diff: @@ -733,20 +733,28 @@ _last_shape_dtype = [None, None]
  _last_zero = [None]
  +def _fast_fill(value, shape, dtype):
  + return array_ops.fill(shape, constant_op.constant(value, dtype=dtype))
  +
  +
  def _zeros(shape, dtype):
  """Wraps array_ops.zeros to cache last zero for a given shape and dtype."""
  if [shape, dtype] != _last_shape_dtype:
  _last_shape_dtype[:] = [shape, dtype]
  - _last_zero[0] = array_ops.zeros(shape, dtype)
  + _last_zero[0] = _fast_fill(0, shape, dtype)
  return _last_zero[0]
  +def _ones(shape, dtype):
  + return _fast_fill(1, shape, dtype)
  +
  +
  _default_vspace = imperative_grad.VSpace(
  num_elements_fn=_num_elements,
  aggregate_fn=_aggregate_grads,
  tensor_id=ops.tensor_id,
  zeros=_zeros,
  - ones=array_ops.ones)
  + ones=_ones)
  class GradientTape(object):
  