Cuda runtime error (59) after printing a tensor

Hi,

I am using a linear layer like the following:

self.emb_to_seq = nn.Linear(512, 40000)

img_seq = self.emb_to_seq(V)

the tensor V has the shape of (8, 121, 512) and type of CudaFloatTensor.

When I want to print it as the following;

print img_seq,

I get the following error:

RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/THC/generic/THCTensorCopy.c:70

What is going on here?

1 Like

Could you run the code an CPU and check, if you’ll get any errors? Often the error messages for a CPU run are clearer than the CUDA equivalent.

1 Like