I need a Torch command that checks if two tensors have the same content, and returns TRUE if they have the same content.
For example:
local tens_a = torc
You can convert the two tensors to numpy arrays:
local tens_a = torch.Tensor((9,8,7,6)); local tens_b = torch.Tensor((9,8,7,6)); a=tens_a.numpy() b=tens_b.numpy()
and then something like
np.sum(a==b) 4
would give you a fairly good idea of how equals are they.