ENAS-pytorch icon indicating copy to clipboard operation
ENAS-pytorch copied to clipboard

AttributeError:‘DataLoader’ object has no attribute ‘size’

Open Jihao-Li opened this issue 6 years ago • 4 comments

Hello, guys. When I run this command: python main.py --network_type cnn --dataset cifar --controller_optim momentum --controller_lr_cosine=True --controller_lr_max 0.05 --controller_lr_min 0.0001 --entropy_coeff 0.1 I got a AttributeError:‘DataLoader’ object has no attribute ‘size’. This is in 148 line in the utils.py. And 'Dataloader' object has no attribute 'narrow' and 'view'. The version of pytorch in my computer is 0.4.1. Is my version wrong? Has anyone got any ideas for this problem?

Jihao-Li avatar Dec 05 '18 01:12 Jihao-Li

Current Implementation seemed only support nlp example task (search construction of rnn cell) the Trainer class now only accept dataset param as torch.Tensor class rather than DataLoader and the doc string had elaborate it. The structure search implementation class in shared_cnn.py not implement favor functions consider update date of this project, should consider abandon this project.

svjack avatar Dec 13 '18 09:12 svjack

OK! Thank you!

Jihao-Li avatar Dec 17 '18 01:12 Jihao-Li

OK! Thank you! I recommend you to try https://github.com/renqianluo/NAO it seems a mixture of current project and the official implemetation https://github.com/melodyguan/enas except that it replaced RL learning optimize method by nlp seq2seq methods if you prefer, You can try to fixed it into RL form.

svjack avatar Dec 17 '18 02:12 svjack

      > OK! Thank you!

I recommend you to try https://github.com/renqianluo/NAO it seems a mixture of current project and the official implemetation https://github.com/melodyguan/enas except that it replaced RL learning optimize method by nlp seq2seq methods if you prefer, You can try to fixed it into RL form.

Thank you for your help. I will have a try.

Jihao-Li avatar Dec 17 '18 13:12 Jihao-Li