Closed deltheil closed 9 years ago
x.pow has for effect to modify in-place its first arg:
x.pow
local x = torch.Tensor{1, 2, 3} local pow = x.pow local x2 = pow(x, 2) print(x) --> {1, 4, 9} i.e x has been modified!
For consistency I also reverted to torch.sum and torch.max that have no impact vs. tensor type (see #24).
torch.sum
torch.max
x.pow
has for effect to modify in-place its first arg:For consistency I also reverted to
torch.sum
andtorch.max
that have no impact vs. tensor type (see #24).