Closed hijinkim closed 1 year ago
Can you please show me where you import torch (or whatever DL library it is that uses cude) ?
Can you please show me where you import torch (or whatever DL library it is that uses cude) ?
I created my own directory objectdetector
within valkka/valkka-live/mvision/
In mvision/objectdetector
, I have __init__.py
and base.py
.
base.py
import torch
class myDetector(Analyzer):
def __init__(self, **kwargs):
self.device = torch.device('cuda:0')
# load pretrained model
I think I've found the cause. I load pretrained model using python package, and I import the package at the top of the source code (outside of Analyzer class). I modified it to import within the Analyzer class and confirmed that the code is working correctly. Thank you :smiley:
Thanks for your work I'm trying to modify 'machine vision' tab using my own model. When I initialize my model like this
and i got error
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method
So how can I solve this error?