pytorch-semantic-segmentation icon indicating copy to clipboard operation
pytorch-semantic-segmentation copied to clipboard

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

Open tailongnguyen opened this issue 6 years ago • 6 comments

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

tailongnguyen avatar Jul 17 '18 09:07 tailongnguyen

@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

oujieww avatar Jul 25 '18 07:07 oujieww

@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.

tailongnguyen avatar Jul 25 '18 11:07 tailongnguyen

@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

oujieww avatar Jul 26 '18 02:07 oujieww

Awesome-semantic-segmentation github repo is what you need. On Thu, Jul 26, 2018, 09:49 oujieww [email protected] 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 .

tailongnguyen avatar Jul 26 '18 03:07 tailongnguyen

@tailongnguyen thank you !!!

oujieww avatar Jul 26 '18 03:07 oujieww

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

robinreni96 avatar Oct 04 '19 20:10 robinreni96