iArunava / ENet-Real-Time-Semantic-Segmentation

ENet - A Neural Net Architecture for real time Semantic Segmentation
BSD 3-Clause "New" or "Revised" License
278 stars 81 forks source link

undefined variable #8

Closed csxeba closed 5 years ago

csxeba commented 5 years ago

python init.py --mode test -i img.jpg -m datasets/CamVid/ckpt-enet.pth

Throws

Traceback (most recent call last):
  File "init.py", line 153, in <module>
    test(FLAGS)
  File ".../ENet-Real-Time-Semantic-Segmentation/test.py", line 32, in test
    out1 = enet(tmg.float()).squeeze(0)
  File ".../.conda/envs/dl/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/data/Prog/PycharmProjects/ENet-Real-Time-Semantic-Segmentation/models/ENet.py", line 194, in forward
    x, i1 = self.b10(x)
  File ".../.conda/envs/dl/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File ".../ENet-Real-Time-Semantic-Segmentation/models/RDDNeck.py", line 108, in forward
    extras = extras.to(device)
NameError: name 'device' is not defined
AvivSham commented 5 years ago

I made some changes try to run it now

csxeba commented 5 years ago

Thanks, it works now!

AvivSham commented 5 years ago

you are welcome :)