ssds.pytorch icon indicating copy to clipboard operation
ssds.pytorch copied to clipboard

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

Open VisionZQ opened this issue 7 years ago • 7 comments

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

VisionZQ avatar Apr 08 '18 04:04 VisionZQ

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,

ShuangXieIrene avatar Apr 08 '18 15:04 ShuangXieIrene

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 avatar Apr 09 '18 01:04 VisionZQ

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

VisionZQ avatar Apr 21 '18 03:04 VisionZQ

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,

foreverYoungGitHub avatar Apr 27 '18 15:04 foreverYoungGitHub

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 avatar Oct 14 '18 12:10 chuanfanyoudong

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

chuanfanyoudong avatar Oct 14 '18 13:10 chuanfanyoudong

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

atnlp avatar Oct 21 '18 08:10 atnlp