some time ago, when running the fast RCNN model in Google’s colab, there was no problem. Later, when using featurize to rent a server to run the model, the same code kept reporting the error “CUDA error: device side assert triggered”
these two days have driven me crazy. There are many blog articles about this situation on the Internet. Most of them say that the label is out of bounds, and some of them have problems in the calculation of loss function
I can only debug step by step, and I’d better solve my own problems.
'''When running with GPU, this function reports an error “CUDA error: device-side assert triggered”''' perm1 = torch.randperm(positive.numel(), device=positive.device)[:num_pos] perm2 = torch.randperm(negative.numel(), device=negative.device)[:num_neg] '''After modification, change device to cpu''' perm1 = torch.randperm(positive.numel(), device="cpu")[:num_pos] perm2 = torch.randperm(negative.numel(), device="cpu")[:num_neg]
Make a record, hoping to help people in the same situation.
- Pytorch failed to specify GPU resolution
- TensorFlow tf.keras.losses .MeanSquaredError
- RuntimeError: ONNX export failed: Couldn‘t export operator aten::upsample_bilinear2d
- [Solved] volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
- Libtorch Error: Expected object of type Variable but found type CUDALongType for argument #2 ‘index’
- Error:scalac: missing or invalid dependency detected while loading class file ***
- C++ Error: terminating with uncaught exception of type std::out_of_range: vector Abort trap: 6
- Angularjs1 exception error:[$injector:unpr]
- Klee Error: Assertion `userMainFn && “unable to get user main“‘ failed
- [Solved] At least one of these environment variable is needed to run this program
- PIP Fatal error in launcher: Unable to create process using
- The imported project “c:\Microsoft.Cpp.Default.props” was not found
- Numpy.exp Function Error ‘Float’ object has no attribute ‘exp’
- How to Solve org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) Error
- target is multiclass but average=’binary’. please choose another average setting.
- The loop of life and death occurs when the El table component of element UI is bidirectional bound
- QT solves error: use of deleted function and is private within this context
- Start Docker Quickstart Terminal error This computer is running Hyper-V. VirtualBox won’t boot a 64bits VM when Hyper-V is activated
- Log separation using tool cronlog
- GO Exception Runnerw.exe: CreateProcess failed with error 21