import tensorflow as tf

    1.

  """
  if not isinstance(tt, TensorTrainBase):
    raise ValueError("`tt` has to be a Tensor Train object")
  else:
    shape = shapes.lazy_raw_shape(tt)
    # I guess variables=tt.tt_cores is not needed here since the output of
    # the function doesn't depend on the values of the TT-cores, only on their
    # shapes etc. But I'm not 100% sure.
    with tf.name_scope(name):
      if tt.is_tt_matrix():
        return matrix_ones(shape, dtype=tt.dtype)
      else:
        return tensor_ones(shape[0, :], dtype=tt.dtype)


def zeros_like(tt, name='t3f_zeros_like'):
  """Constructs t3f.zeros with the shape of `tt`.

