Skip to content

Runtime error: dimension out of range #22

@kindlychung

Description

@kindlychung
python test.py 
Variable containing:
(0 ,.,.) = 
  0.8000  0.3000  1.0000
  0.5000  0.0000  0.0000
[torch.FloatTensor of size 1x2x3]

Traceback (most recent call last):
  File "test.py", line 28, in <module>
    out, aux = g(input)
  File "/home/kaiyin/miniconda3/envs/torch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 325, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/kaiyin/PycharmProjects/stn.pytorch/script/modules/gridgen.py", line 30, in forward
    loss = torch.sum(loss,2)
RuntimeError: dimension out of range (expected to be in range of [-2, 1], but got 2)

Pytorch version: 0.3.0.post4
Python 3.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions