tt_rank[i + 1])
tt_cores[i] = tf.random_normal(curr_core_shape, mean=mean, stddev=stddev)
return TensorTrain(tt_cores, shape, tt_rank)
def random_matrix_batch(shape, tt_rank=2, batch_size=1, mean=0., stddev=1.):
Generate a random batch of TT-matrices of given shape.
After Change
tt = matrix_with_random_cores(shape, tt_rank=tt_rank, stddev=core_stddev)
if np.abs(mean) < 1e-8:
return tt
else:
raise NotImplementedError("non-zero mean is not supported yet")