New user, stuck with tuple index out of range error

Hi all, new user, looking to replicate this tutorial with my own data set, consistently getting stick with a tuple index out of range error. I’ve google’d and searched for the last couple of hours & couldn’t come up with anything.


Any help would be amazing

Can you print out line_tensor.size()? It looks like it might be empty?

You’re right, it is empty. Hmm. I haven’t noticed this before, again very new to PyTorch.

All right, I’ve fixed the line_tensor.size. I realized I was splitting the files with the wrong deliminator. So now, I’m getting a print(line_tensor.size()), but still getting the same tuple index out of range error.

So it looks like it will populate when you run the code through, then rerunning through the print down will empty it. Any advice on that?

What exactly is causing the tensor to be empty?

That’s a good question, it’s emptying when I get to code in the original image. When I run that, the tensor line empties. Then if I run the random function again, it populates. As seen here: