icnet error (icnet return tuple but not write that logic)
See original GitHub issueHi, icnet returned a tuple when training… but when calculating loss, it directly get size from tuple and got this error:
Traceback (most recent call last):
File "train.py", line 230, in <module>
train(cfg, writer, logger)
File "train.py", line 132, in train
loss = loss_fn(input=outputs, target=labels)
File "pytorch-semseg/ptsemseg/loss/loss.py", line 10, in cross_entropy2d
n, c, h, w = input.size()
AttributeError: 'tuple' object has no attribute 'size'
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (6 by maintainers)
Top Results From Across the Web
python - writing error when nothing returned from tuple within list
I would like my code to write "error" a single time if the user input is not within tup_list. I also don't understand...
Read more >Returning tuple does not work with mapped tasks · Issue #4824
It works fine if the task is not mapped and either "nout" task annotation parameter is used, or type annotation Tuple is used....
Read more >Course Descriptions - Montcalm Community College - Acalog ACMS™
Return multiple values from a function via a tuple. Goal 5: Build programs that work with files. Develop programs to read, write, and...
Read more >Software Approach to Hazard Detection Using On-line Analysis of ...
The research here addresses the problem of improving software safety through ... we introduce the Cnet toolkit and discuss its support for complex...
Read more >Untitled
However, metrics for assessment of paths and related performance aspects had not been attempted in IPPM when the framework in was written.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Due to high proportion of pixels for
background
class in the Pascal VOC dataset, if you train the model from scratch, the model might tend to only learnbackground
class. Therefore, you may need to do class balancing to set higher loss weights for the rare classes, or setignore_index=0
inF.cross_entropy
to ignore background class before the model learned for all the other classes.You can also download the converted Caffe pretrained weights here, and set
img_norm=False
andversion="pascal"
arguments in data_loader (due to data preprocessing of original Caffe implementation). Then use larger batch size and smaller learning rate to fine-tune the model on these datasets.My network doesn’t seem to learn even after 10000 training iterations. the miou is still at 0.20.