https://drive.google.com/open?id=12xP1Ll4UeI4tt7Cq0P9dtaSPCF_sqOoh
This is the program I am trying to build and I am not using cuda anywhere because I have MacBook air which can not support cuda. Can anyone help me with what is the problem that it is showing a CUDA error??
the error is generated input_img = Variable(image_tensor.type(Tensor)) i.e in line 20 of detect_image(img)
What kind of error message do you get?
I cannot find a definition for Tensor
. Did you use from torch import *
somewhere?
ERROR -->
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-21-2620be06dd37> in <module>
4 prev_time = time.time()
5 img = Image.open(img_path)
----> 6 detections = detect_image(img)
7 inference_time = datetime.timedelta(seconds=time.time() - prev_time)
8 #print ('Inference Time: %s' % (inference_time))
<ipython-input-20-5e3b41feb37a> in detect_image(img)
17 image_tensor = image_tensor.unsqueeze_(0)
18 print(image_tensor)
---> 19 input_img = Variable(image_tensor.type(Tensor))
20 print("3")
21 # run inference on the model and get detections
RuntimeError: Cannot initialize CUDA without
ATen_cuda library. PyTorch splits its backend
into two shared libraries: a CPU library and a
CUDA library; this error has occurred because
you are trying to use some CUDA functionality,
but the CUDA library has not been loaded by
the dynamic linker for some reason. The CUDA
library MUST be loaded, EVEN IF you don't
directly use any symbols from the CUDA library!
One common culprit is a lack of -Wl,--no-as-
needed in your link arguments; many dynamic
linkers will delete dynamic library dependencies
if you don't depend on any of their symbols.
You can check if this has occurred by using ldd
on your binary to see if there is a dependency
on *_cuda.so library.
This is not a CUDA error. Apparently the module is missing.
Did you clone the whole repository and started your terminal / notebook in this directory?
sir I have changed the error… the last was a wrong one… Kindly review it once again
basically the error is somewhere in
# convert image to Tensor
image_tensor = img_transforms(img).float()
image_tensor = image_tensor.unsqueeze_(0)
input_img = Variable(image_tensor.type(Tensor))
# run inference on the model and get detections
with torch.no_grad():
detections = model(input_img)
detections = utils.non_max_suppression(detections, 80, conf_thres, nms_thres)
return detections[0]
this section is in PyTorch_Object_Detection.ipynb in the detect_image(img) function
Hi @Siddharth_Saurabh , did you find how to solve this error message?