![]() In somehow, the dataloader may have re-initialized CUDA and messed it for the dataset class. My dataset class is the first class to use CUDA. However, I think CUDA needs to be initialized at that class, because it starts using it. ![]() I tried to remove _available() within my dataset class to avoid CUDA initialization, and use _start_method("spawn"), but it didn't help (but I am not sure if I am missing something). I have read all the above comments, and other forums ( 1, 2, 3). RuntimeError: CUDA error: initialization error ![]() The issue raised when starts looping over the samples: My dataset class is instantiated, gets the device, create the model that does the prerocessing, did some preprocessing to validation set samples.The issue starts when using this class with. The class was tested (alone) and works fine. The class gets the device: self.DEVICE = vice(device) and maintains it for future use (to send samples to be processed to the GPU). This preprocessing is performed by some neural network that I created that was instantiated inside the class and sent to the GPU. Inside this class, I do some preprocessing on samples in the GPU. ![]() I created a class that inherits from to make my own dataset.I run to the same issue using Python 3.7.1 and Pytorch 1.0.0.Įrror: RuntimeError: CUDA error: initialization error. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |