I am trying to use code for image captioning given in the pytorch tutorial. I have changed the size of vocab and correspondingly the captions.
But now at the step of Embedding(captions) i am getting the following error
(Pdb) embeddings[1]
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1524590031827/work/aten/src/THC/generic/THCTensorCopy.c line=70 error=59 : device-side assert triggered
*** RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1524590031827/work/aten/src/THC/generic/THCTensorCopy.c:70


Actually while running the code step by step the line embedding = embed(captions) executed and I can also see its size but when i tried to print its values or execute the next line(i.e. embeddings = torch.cat((features.unsqueeze(1), embeddings), 1)) I got the above mentioned error.
I have no idea what is the problem. Thanks in advance for any help.