bb5996c668d982601f38fe678148c4e668325a08,t3f/tensor_train.py,TensorTrain,__str__,#TensorTrain#,129

Before Change


    return self.tt_cores[0].graph

  def __str__(self):
    raise NotImplementedError
    // return "TensorTrain(indices=%s, values=%s, dense_shape=%s)" % (
    //     self._indices, self._values, self._dense_shape)

  def ndims(self):

After Change


  def __str__(self):
    A string describing the TensorTrain object, its TT-rank and shape.
    // TODO: tensors vs variables.
    shape = self.get_shape()
    tt_ranks = self.get_tt_ranks()
    if self.is_tt_matrix():
      raw_shape = self.get_raw_shape()
      return "A Tensor Train Matrix of size %d x %d, underlying tensor " \
             "shape: %s x %s, TT-ranks: %s" % (shape[0], shape[1],
                                               raw_shape[0], raw_shape[1],
                                               tt_ranks)
    else:
      return "A Tensor Train of shape %s, TT-ranks: %s" % (shape, tt_ranks)

  def ndims(self):
    Get the number of dimensions of the underlying TT-tensor.
    Returns:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Bihaqo/t3f
Commit Name: bb5996c668d982601f38fe678148c4e668325a08
Time: 2017-03-13
Author: novikov@bayesgroup.ru
File Name: t3f/tensor_train.py
Class Name: TensorTrain
Method Name: __str__


Project Name: Bihaqo/t3f
Commit Name: c4d25dad258c593270c5e405f8a5182d536f8d88
Time: 2017-01-25
Author: novikov@bayesgroup.ru
File Name: tensor_train.py
Class Name: TensorTrain
Method Name: get_shape


Project Name: deepmind/sonnet
Commit Name: ef86d2e73e7ce03c4184a04a336d96caf661269a
Time: 2017-07-03
Author: noreply@google.com
File Name: sonnet/python/modules/conv.py
Class Name: Conv1DTranspose
Method Name: _build