huawei-noah / VanillaNet

MIT License
811 stars 56 forks source link

TypeError: 'float' object is not iterable #39

Closed yueyue0112 closed 7 months ago

yueyue0112 commented 8 months ago

Hi, thanks for sharing this useful work! I'm reading the program and there was something wrong when I debug 'main.py' (train). The problem is as following:

for ema_decay in args.model_ema_decay:
TypeError: 'float' object is not iterable

'args.model_ema_decay' was set 0.99996 as guideline. Could you give some suggestions on the problem? Thanks a lot.

Yue.

ggjy commented 7 months ago

you can directly change the default args.model_ema_decay from 0.99996 to [0.99996], this for loop is used to train with multiple ema decay numbers simultaneously.

yueyue0112 commented 7 months ago

Got it! It can work now. Thanks a lot!