question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running ICNet with PascalVOC

See original GitHub issue

Hello,

When I run python train.py --arch icnet --dataset pascal --n_epoch 500 I get the following output (checked on Windows and Linux, with PyTorch 0.3.1 and 0.4.1) The dataset is the one here.

Using custom loss
Traceback (most recent call last):
  File "train.py", line 160, in <module>
    train(args)
  File "train.py", line 86, in train
    outputs = model(images)
  File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 357, in __call__
    result = self.forward(*input, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\parallel\data_parallel.py", line 68, in forward
    return self.module(*inputs, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 357, in __call__
    result = self.forward(*input, **kwargs)
  File "D:\nn\github\pytorch-semseg\ptsemseg\models\icnet.py", line 120, in forward
    x_sub24, sub4_cls = self.cff_sub24(x_sub4, x_sub2)
  File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 357, in __call__
    result = self.forward(*input, **kwargs)
  File "D:\nn\github\pytorch-semseg\ptsemseg\models\utils.py", line 500, in forward
    high_fused_fm = F.relu(low_fm+high_fm, inplace=True)
RuntimeError: The size of tensor a (15) must match the size of tensor b (16) at non-singleton dimension 3

Am I doing something wrong? Please let me know if you need more info.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
adam9500370commented, Aug 12, 2018

Since the kernel sizes and strides of pyramid pooling in original ICNet implementation are hard-coded, https://github.com/meetshah1995/pytorch-semseg/blob/dfecf4973c702c9be4b55d5066bd4a79bcb0c1bb/ptsemseg/models/utils.py#L382-L383 you may replace those lines with the following lines to set k_sizes and strides appropriately. https://github.com/meetshah1995/pytorch-semseg/blob/dfecf4973c702c9be4b55d5066bd4a79bcb0c1bb/ptsemseg/models/utils.py#L376-L380

0reactions
zhengsz12commented, Apr 2, 2020

Thanks, solved.

am facing the similar problem now. Can you tell me how to modify the function get_interp_size in ptsemseg/models/utils.py?Thanks for you help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when running ICNet with PascalVOC · Issue #114 · meetps ...
Hello, When I run python train.py --arch icnet --dataset pascal --n_epoch 500 I get the following output (checked on Windows and Linux, with...
Read more >
Error when trying pascal voc 2012 segmentation - Fast.ai forums
When running, I got RuntimeError: CUDA error: device-side assert triggered. Generally, this error means there is something wrong in classes. I ...
Read more >
mmseg.apis — MMSegmentation 0.29.1 documentation
Using RepeatDataset can reduce the data loading time between epochs. Parameters ... ICNet for Real-Time Semantic Segmentation on High-Resolution Images.
Read more >
On the Robustness of Semantic Segmentation Models ... - arXiv
Pascal VOC, when using the same hyperparameters as [55]. Thus, it may be a dataset property that causes the net-.
Read more >
Benchmarking the Robustness of Semantic ... - Springer Link
The performance of CNN models is generally measured using benchmarks ... generated from the Cityscapes dataset, PASCAL VOC 2012, and ADE20K.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found