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
TypeError from crop_and_resize.py : "initializer for ctype 'struct THCudaTensor *' must be a pointer to same type, not cdata 'struct THFloatTensor *"
#26
Open
kathydo opened this issue
Mar 31, 2019
· 2 comments
Hi, I am trying to use the CropAndResize function on a GPU and am getting the following error. Does anyone have any suggestions? I am running with Python 3.7 and Pytorch 0.4.1.
X_conv451_crop = CropAndResizeFunction(self.crop_height, self.crop_width, 0)(X_conv451_torch, boxes, box_index) File "/home/kdo/anaconda3/envs/honours/lib/python3.7/site-packages/roi_align-0.0.1-py3.7.egg/roi_align/crop_and_resize.py", line 23, in forward self.extrapolation_value, self.crop_height, self.crop_width, crops) File "/home/kdo/anaconda3/envs/honours/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 202, in safe_call result = torch._C._safe_call(*args, **kwargs) TypeError: initializer for ctype 'struct THCudaTensor *' must be a pointer to same type, not cdata 'struct THFloatTensor *'
The text was updated successfully, but these errors were encountered:
Hey, if I remember correctly it was a Pytorch version issue. Using this version of crop an resize only allows pytorch 0.4.0 and before actually (not Pytorch 0.4.1). I ended up using the function from https://github.com/multimodallearning/pytorch-mask-rcnn which supports pytorch 0.4.1
Hi, I am trying to use the CropAndResize function on a GPU and am getting the following error. Does anyone have any suggestions? I am running with Python 3.7 and Pytorch 0.4.1.
X_conv451_crop = CropAndResizeFunction(self.crop_height, self.crop_width, 0)(X_conv451_torch, boxes, box_index) File "/home/kdo/anaconda3/envs/honours/lib/python3.7/site-packages/roi_align-0.0.1-py3.7.egg/roi_align/crop_and_resize.py", line 23, in forward self.extrapolation_value, self.crop_height, self.crop_width, crops) File "/home/kdo/anaconda3/envs/honours/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 202, in safe_call result = torch._C._safe_call(*args, **kwargs) TypeError: initializer for ctype 'struct THCudaTensor *' must be a pointer to same type, not cdata 'struct THFloatTensor *'
The text was updated successfully, but these errors were encountered: