Apologies in advance since I’m really new to pytorch and machine learning in general,
I’m trying to run a notebook where I convert data in the form of a list of 4-element lists into a tensor, then shuffle that data. When I start to shuffle the tensor based on random indices, the kernel dies, and I’m lost as to why. Can anyone help explain what’s going on here?
Everything above the screenshot is class/method definitions and import statements, the method adds 4-element lists to the parent list it takes as an argument.
idx is just torch.randperm(8591). Would this just be the result of an extremely memory inefficient approach? I used the method listed here. If it’s just a memory issue, are there any alternative approaches to shuffling that I should look into?
It does feel like this might be a memory issue. One quick thing you could do is to try running this on another machine with more memory and see if it still fails.
Another thing you could try is some of the top suggestions from this SO thread. If you’re in Python 3.4 then theasmalloc might be the best thing to try, otherwise there appear to be pretty good third party libraries that you could use to see whether this is indeed a memory allocation issue.
I hope these suggestions help you out.
Thanks for responding, I forgot to check back here to give an update. It was in fact just a memory issue, and after cutting down the amount of data I was feeding, everything worked fine. Thanks!