a-PyTorch-Tutorial-to-Image-Captioning icon indicating copy to clipboard operation
a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard

Train on Windows

Open michael20at opened this issue 6 years ago • 1 comments

Hi, not a bug per se, but I couldn't train on windows 10 at first.

Had to set dataloader workers to 0.

And for

scores, *_ = pack_padded_sequence(scores, decode_lengths, batch_first=True)
targets, *_ = pack_padded_sequence(targets, decode_lengths, batch_first=True)

in train.py I had to add * to unpack all the values.

Then it worked (slow, but still), just thought I post this here if anyone wants to train on windows!

michael20at avatar Jul 19 '19 16:07 michael20at

It is a common issue for the workers must be set to 0 on Windows 10,please see cuda-ipc-operations

  1. Don’t use multiprocessing. Set the num_worker of DataLoader to zero.

As for the 2nd question, I guess you run the code on PyTorch 1.1.0, it is slightly different from PyTorch 1.0.1 for the return value of pack_padded_sequence.

Doragd avatar Jul 27 '19 05:07 Doragd