roboinstruct-2 icon indicating copy to clipboard operation
roboinstruct-2 copied to clipboard

Error when executing train.py in chainer

Open sho27rls opened this issue 8 years ago • 1 comments

autoencoder / chainer_vaegan / src / train.py When I ran this, an error sentence appeared as follows.

Traceback (most recent call last): File "train.py", line 456, in train (enc_model, gen_model, dis_model, optimizer_enc, optimizer_gen, optimizer_dis, args.iter, out_image_dir = args.out_image_dir) File "train.py", line 408, in train loss_enc, loss_gen, loss_dis, loss_rec, loss_rnn = train_one (enc, gen, dis, rnn_model, optimizer_enc, optimizer_gen, optimizer_dis, i) File "train.py", line 276, in train_one z0, mean, var, _ = enc [0] (Variable (x_in)) ValueError: need more than 3 values ​​to unpack

What kind of error is this? I have not got python knowledge since I have not spent a lot of time for the first time in the program. How can I remove the error?

I created a trajectory folder in the roboinstruct root folder and copied the data (task - 3001, task - 3002, task - 3003, task - 3005, task - 3006) recorded by al5d demonstration. I also created a models folder in the roboinstruct root folder.

Ubuntu 16.04 Python 2.7 Chainer 2.1 copy 1.03 cudnn 6 I ran using these.

sho27rls avatar Oct 15 '17 06:10 sho27rls

The problem was that the encoder function returns 3 values but in the train.py we are expecting 4 values. I made a quick fix to autoencoder / chainer_vaegan / src / net.py line 44 is now changed to return z, mean, var, h4. I hope this solves the problem.

rrahmati avatar Oct 15 '17 14:10 rrahmati