Deep-Residual-Shrinkage-Networks-for-intelligent-fault-diagnosis-DRSN- icon indicating copy to clipboard operation
Deep-Residual-Shrinkage-Networks-for-intelligent-fault-diagnosis-DRSN- copied to clipboard

请教代码

Open T0ng0715 opened this issue 1 year ago • 2 comments

请问为什么在训练网络时DataLoader中batchsize只能为1不然会报错,但设为1后bn层用不了了。

T0ng0715 avatar Mar 14 '23 02:03 T0ng0715

Expected more than 1 value per channel when training, got input size torch.Size([1, 64]) 超过1就会报这个错误,可以解答以下嘛

T0ng0715 avatar Mar 14 '23 02:03 T0ng0715

Expected more than 1 value per channel when training, got input size torch.Size([1, 64]) 超过1就会报这个错误,可以解答以下嘛

Hi! Maybe you could try to set "drop_last = True" in dataloader to fix this issue.

yeyulege avatar Mar 27 '23 16:03 yeyulege