ShuangXieIrene / ssds.pytorch

Repository for Single Shot MultiBox Detector and its variants, implemented with pytorch, python3.
MIT License
571 stars 166 forks source link

Fan in and fan out can not be computed for tensor with less than 2 dimensions?? #9

Open VisionZQ opened 6 years ago

VisionZQ commented 6 years ago

Hi,

I train the mode of 'fssd_lite_mobilenetv2_train_voc.yml', ValueError 'Fan in and fan out can not be computed for tensor with less than 2 dimensions'

wx20180408-123216 2x
I try to review code ,but I can not handle the issue by change the method of init.  Can you give me some proposal?thanks
ShuangXieIrene commented 6 years ago

Sorry for the late reply, Recently, we are little busy with another project. It's almost done, so we'll have time to come back and play with different detector again.

I do not analyze that part of the code in fact. But we fixed it by applying just simply remove the init() from the original code by the most recent commit.

We'll fix it at the later time. Cause better init way may have an impact on the final result. But it is not fundamentally. So you can just use the current version first.

Best,

VisionZQ commented 6 years ago

I really appreciate you . I quite agree with you,init the net from the pre-training model is ok。。 I have a little question,

wx20180409-092729 2x

why did not you normalize the bounding box with width and height ? Are there any tricks here?

VisionZQ commented 6 years ago

Hi, I review the code again carefully. Seems to have found the bug. Initialize the the 'conv' layer, but 'conv' layer involve ['Conv2d , BatchNorm.Relu],

qq20180421-113029 2x

The dimension of BatchNorm layer only is 1 , it is less than 2.. so , 'Fan in and fan out can not be computed for tensor with less than 2 dimensions' happened when initialize the layer by KaiMing method

foreverYoungGitHub commented 6 years ago

Brilliant! it should be the problem!

I'll check later, recently the code need to be changed a lot caused the pytorch version update.

Thanks for your great work! I'll check it again.

Best,

chuanfanyoudong commented 5 years ago

Hi, I review the code again carefully. Seems to have found the bug. Initialize the the 'conv' layer, but 'conv' layer involve ['Conv2d , BatchNorm.Relu],

qq20180421-113029 2x

The dimension of BatchNorm layer only is 1 , it is less than 2.. so , 'Fan in and fan out can not be computed for tensor with less than 2 dimensions' happened when initialize the layer by KaiMing method

hi,i meet same question with u , i find the problem accure when i want to construct the vectors. could u tell me how to solve this problem? thank u

chuanfanyoudong commented 5 years ago

Hi, I review the code again carefully. Seems to have found the bug. Initialize the the 'conv' layer, but 'conv' layer involve ['Conv2d , BatchNorm.Relu],

qq20180421-113029 2x

The dimension of BatchNorm layer only is 1 , it is less than 2.. so , 'Fan in and fan out can not be computed for tensor with less than 2 dimensions' happened when initialize the layer by KaiMing method

hi,i meet same question with u , i find the problem accure when i want to construct the vectors. could u tell me how to solve this problem? thank u,

sorry to disturb u , i change the version of the torchtext , and the problem was solved, the reason is that when the version of torchtext is 0.3.1 , it can't init the vector of "unk", and i change the version to 0.2.3, the problem were solved. so sorry

atnlp commented 5 years ago

sorry to disturb u , i change the version of the torchtext , and the problem was solved, the reason is that when the version of torchtext is 0.3.1 , it can't init the vector of "unk", and i change the version to 0.2.3, the problem were solved. so sorry

Solved my problem

Hi, I review the code again carefully. Seems to have found the bug. Initialize the the 'conv' layer, but 'conv' layer involve ['Conv2d , BatchNorm.Relu],

qq20180421-113029 2x

The dimension of BatchNorm layer only is 1 , it is less than 2.. so , 'Fan in and fan out can not be computed for tensor with less than 2 dimensions' happened when initialize the layer by KaiMing method

hi,i meet same question with u , i find the problem accure when i want to construct the vectors. could u tell me how to solve this problem? thank u,

sorry to disturb u , i change the version of the torchtext , and the problem was solved, the reason is that when the version of torchtext is 0.3.1 , it can't init the vector of "unk", and i change the version to 0.2.3, the problem were solved. so sorry

Solved my problem