Esempio n. 1
0
 def normalise_tensor(self):
     """
     Normalise the tensor by dividing it by its norm, defined such that
     np.sqrt(X:X)
     """
     self.tensor, tensor_norm = utils.normalise_tensor(self.tensor)
     return self.tensor / tensor_norm, tensor_norm
Esempio n. 2
0
 def normalise_tensor(self):
     """
     Normalise the tensor by dividing it by its norm, defined such that
     np.sqrt(X:X)
     """
     self.tensor, tensor_norm = utils.normalise_tensor(self.tensor)
     return self.tensor / tensor_norm, tensor_norm