zijundeng / pytorch-semantic-segmentation

PyTorch for Semantic Segmentation
MIT License
1.73k stars 393 forks source link

[Segnet] TypeError: new() received an invalid combination of arguments #42

Open tailongnguyen opened 6 years ago

tailongnguyen commented 6 years ago

Hi, I am using pytorch version 0.4.0, python 3.6 and this code appears to need a minor modification to make Segnet works. Here is the bug: image I found out that the line 12 should change from middle_channels = in_channels / 2 to middle_channels = in_channels // 2

oujieww commented 6 years ago

@tailongnguyen is your training ok? i also want to train segnet on voc but with training go on ,my mean iu is always =0.03469,can you give me your setting about trainning code,i use the setting same as fcn,lr=2.5e-4

tailongnguyen commented 6 years ago

@oujieww I used this code but did not focused on this SegNet architecture, thus only tried on training with one set of hyper parameters (lr = 1e-4, negative log likelihood loss function with weighted scheme following E-Net) . The performance was unexpectedly bad, too. I am not sure if there was something wrong with the code or my dataset is just not suitable with this model, so I skipped it. However, if you ask about the training, my mean IoU DID change over the training phase.

oujieww commented 6 years ago

@tailongnguyen yeah, is your training mIoU is nromal? such as bigger than 0.5? and i have tried this code on fcn32s even is better than official code mIoU is 0.6447 i got. but for other model of this code i can not work, ,XD , do u know where can find a good code of semantic segmentation , i want to do some test on segmentation XD

tailongnguyen commented 6 years ago

Awesome-semantic-segmentation github repo is what you need. On Thu, Jul 26, 2018, 09:49 oujieww notifications@github.com wrote:

@tailongnguyen https://github.com/tailongnguyen yeah, is your training mIoU is nromal? such as bigger than 0.5? and i have tried this code on fcn32s even is better than official code mIoU is 0.6447 i got. but for other model of this code i can not work, ,XD , do u know where can find a good code of semantic segmentation , i want to do some test on segmentation XD

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zijundeng/pytorch-semantic-segmentation/issues/42#issuecomment-407959159, or mute the thread https://github.com/notifications/unsubscribe-auth/AWZ-P_rLMYZcYfB-8iNVvYWuCYCaCoDMks5uKS4igaJpZM4VSia4 .

oujieww commented 6 years ago

@tailongnguyen thank you !!!

robinreni96 commented 5 years ago

Its simple in the Decoderblock inside init function instead of middle_channels = in_channels / 2 use middle_channels = int(in_channels / 2)