diff options
author | koray kavukcuoglu <koray@kavukcuoglu.org> | 2013-02-11 20:50:16 +0400 |
---|---|---|
committer | koray kavukcuoglu <koray@kavukcuoglu.org> | 2013-02-11 20:50:16 +0400 |
commit | e098ae1382c3a635a696bd66aca29a45af25cad5 (patch) | |
tree | 2260a69c37f2d331125a694094c3bae27ca0e3f1 /Tensor.lua | |
parent | a3289c4f51ed8680383915cda0bf6c57268a14bb (diff) |
make tensor.expand create a tensor from correct type, not default type.
Diffstat (limited to 'Tensor.lua')
-rw-r--r-- | Tensor.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -310,7 +310,7 @@ function Tensor.expand(tensor,...) end -- create new view, with singleton expansion: - tensor = torch.Tensor(tensor:storage(), tensor:storageOffset(), + tensor = tensor.new(tensor:storage(), tensor:storageOffset(), tensor_size, tensor_stride) return tensor end |