Spaces:
Build error
Build error
Download util/lua/nn/test_Scale.lua from rawanessam/FloorPlanTransformation: direct link, hf CLI and curl.
- Browser
- Download file 221 Bytes
-
https://huggingface.co/spaces/rawanessam/FloorPlanTransformation/resolve/main/util/lua/nn/test_Scale.lua
- Command line
-
hf download hf://spaces/rawanessam/FloorPlanTransformation/util/lua/nn/test_Scale.lua
-
curl -L -o test_Scale.lua https://huggingface.co/spaces/rawanessam/FloorPlanTransformation/resolve/main/util/lua/nn/test_Scale.lua
221 Bytes
| require 'nn' | |
| require 'Scale' | |
| a = nn.Scale(100) | |
| x = torch.rand(2, 3, 4, 4):mul(200/16) | |
| y = torch.Tensor({{2, 2, 3, 3}, {1, 1, 3, 3}}) | |
| z = a:forward({x, y}) | |
| w = a:backward({x, y}, z) | |
| print(x) | |
| print(y) | |
| print(z) | |
| print(w) | |