python main.py
Starting Generator MLE Training...
epoch 1 : /home/maple/work/seqGAN-pytorch/generator.py:49: UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.
out = F.log_softmax(out)
main.py:55: UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number
total_loss += loss.data[0]
..........Traceback (most recent call last):
File "main.py", line 159, in <module>
train_generator_MLE(gen, gen_optimizer, oracle, oracle_samples, MLE_TRAIN_EPOCHS)
File "main.py", line 67, in train_generator_MLE
start_letter=START_LETTER, gpu=CUDA)
File "/home/maple/work/seqGAN-pytorch/helpers.py", line 80, in batchwise_oracle_nll
s = batchwise_sample(gen, num_samples, batch_size)
File "/home/maple/work/seqGAN-pytorch/helpers.py", line 74, in batchwise_sample
samples.append(gen.sample(batch_size))
File "/home/maple/work/seqGAN-pytorch/generator.py", line 72, in sample
samples[:, i] = out.data
RuntimeError: expand(torch.LongTensor{[32, 1]}, size=[32]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)
The following error happens when training.