datvuthanh / HybridNets

HybridNets: End-to-End Perception Network
MIT License
585 stars 120 forks source link

AssertionError BUG #38

Closed harrylee999 closed 2 years ago

harrylee999 commented 2 years ago

if i just want to seg one class,such as seg_list only have ’road‘. Then i run train.py , in loss.py line 538, in soft_tversky_score assert output.size() == target.size() AssertionError

then i debug code,find output.size() = torch.Size([2, 1, 245760]) target.size() = torch.Size([2, 1, 491520])

How to fix that???

xoiga123 commented 2 years ago

Should work now

xoiga123 commented 2 years ago

Btw, I fixed this by using softmax for both binary and multi-class. While it is learnable, some advocate against this approach. I'll separate binary, multi-class and multi-label in #40.