Spaces:
Build error
Build error
Download util/lua/nn/test_GDLCriterion.lua from rawanessam/FloorPlanTransformation: direct link, hf CLI and curl.
- Browser
- Download file 241 Bytes
-
https://huggingface.co/spaces/rawanessam/FloorPlanTransformation/resolve/main/util/lua/nn/test_GDLCriterion.lua
- Command line
-
hf download hf://spaces/rawanessam/FloorPlanTransformation/util/lua/nn/test_GDLCriterion.lua
-
curl -L -o test_GDLCriterion.lua https://huggingface.co/spaces/rawanessam/FloorPlanTransformation/resolve/main/util/lua/nn/test_GDLCriterion.lua
241 Bytes
| require 'GDLCriterion' | |
| a = torch.ones(2, 2, 2, 2) | |
| b = torch.zeros(2, 2, 2, 2) | |
| c = nn.GDLCriterion(2) | |
| l = c:forward(a, b) | |
| d = c:backward(a, b) | |
| print(l) | |
| print(d) | |
| b[1][1][1][1] = 1 | |
| l = c:forward(a, b) | |
| d = c:backward(a, b) | |
| print(l) | |
| print(d) | |