You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finally I've managed to install all prerequisites (cunn, CUDA, cutorch)
Now I try to run an example as in your notebook:
import lutorpy as lua
import numpy as np
from skimage import io
from utils.img_processing import process_img
from utils.face_dlib import AlignDlib
from utils.Classifier import HotOrNotTorchRegression
# define face model
fdet = AlignDlib()
# define scoring model
net = HotOrNotTorchRegression(gpu_mode=0,model_path='trained/', model_file='model_best.t7', image_size=224)
# score function
def score_image(img):
# find all faces
dets = fdet.getAllFaceBoundingBoxes(img)
# if there is only one match, go and score
if len(dets) != 0:
det = dets[0]
img2, face_img = process_img(img, fdet, size=224, is_shortest=True,
margins={'width':0.5, "bottom":0.5, "top":0.5},
bbox={'x1':int(np.round(det.left())),
'x2':int(np.round(det.right())),
'y1':int(np.round(det.top())),
'y2':int(np.round(det.bottom()))})
score = net.classify_image(img2)[1]
return img2, score
else:
return None, None
# read an example image from web
img_url = "https://s-media-cache-ak0.pinimg.com/originals/9a/3b/65/9a3b65c368c712ca322394ee4d19d407.jpg"
img = io.imread(img_url)
score = score_image(img)[1]
Output:
THCudaCheck FAIL file=/home/serj/torch/extra/cutorch/lib/THC/THCGeneral.c line=66 error=30 : unknown error
Traceback (most recent call last):
File "example.py", line 6, in <module>
from utils.Classifier import HotOrNotTorchRegression
File "/home/serj/work/beautytorch/beauty.torch/utils/Classifier.py", line 11, in <module>
lua.require('cunn')
File "/home/serj/work/beautytorch/venv/local/lib/python2.7/site-packages/lutorpy/__init__.py", line 112, in require
ret = luaRuntime.require(module_name)
File "lutorpy/_lupa.pyx", line 318, in lutorpy._lupa.LuaRuntime.require (lutorpy/_lupa.c:6189)
File "lutorpy/_lupa.pyx", line 1658, in lutorpy._lupa.call_lua (lutorpy/_lupa.c:25877)
File "lutorpy/_lupa.pyx", line 1667, in lutorpy._lupa.execute_lua_call (lutorpy/_lupa.c:25987)
File "lutorpy/_lupa.pyx", line 1620, in lutorpy._lupa.raise_lua_error (lutorpy/_lupa.c:25297)
lutorpy._lupa.LuaError: cuda runtime error (30) : unknown error at /home/serj/torch/extra/cutorch/lib/THC/THCGeneral.c:66
Maybe the problem is that my GPU is not NVidia. Can I disable cunn somehow? Please help!
ADD: can't run convert2cpu because of the same.
UPD As adviced by cutorch developers the conversion from GPU to CPU model is not possible without having NVidia GPU. It would be very helpful if CPU model could be shared as well.
The text was updated successfully, but these errors were encountered:
Finally I've managed to install all prerequisites (
cunn
,CUDA
,cutorch
)Now I try to run an example as in your notebook:
Output:
Maybe the problem is that my GPU is not NVidia. Can I disable
cunn
somehow? Please help!ADD: can't run convert2cpu because of the same.
UPD As adviced by cutorch developers the conversion from GPU to CPU model is not possible without having NVidia GPU. It would be very helpful if CPU model could be shared as well.
The text was updated successfully, but these errors were encountered: