longcw / RoIAlign.pytorch

RoIAlign & crop_and_resize for PyTorch
555 stars 103 forks source link

install error #11

Closed dami23 closed 6 years ago

dami23 commented 6 years ago

Hi, thank you for your work and share. The system is ubuntu16.04 with pytorch 0.5.0. When I run ./install.sh, an error: dereferencing pointer to incomplete type 'THTensor {aka struct THTensor}' const int batch_size = image->size[0]; occurred. I cannot find a solution on google, could you give me a cue to solve this error. Thank you very much!

cbasavaraj commented 6 years ago

Hi, I have the same error on pytorch 0.4.1. Were you able to solve this? Thanks

dm-druid commented 6 years ago

pytorch 0.3.1 works.

cbasavaraj commented 6 years ago

Hi, I'm not sure what was wrong, but the error disappeared after I reinstalled PyTorch using pip install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl 0.4.1 had been installed when I did: pip install torchvision

dm-druid commented 6 years ago

Sometimes we don't know why but it works. ╮(╯_╰)╭

dongb5 commented 6 years ago

I commented the lines corresponding to cpu version files in build.py and it is built without error. Considering I always run deep learning codes with gpu available, it works for me. : )

liuboss1992 commented 6 years ago

Hi, I met with the samp problem as you, and I sloved it by downgradem my pytorch from 0.4.1 to 0.4.0

cee1 commented 6 years ago

aten/src/TH/generic/THTensor.h

// Struct definition moved to THTensor.hpp
 typedef struct THTensor THTensor;

aten/src/TH/THTensor.hpp

struct THTensor
 {
     THTensor(THStorage* storage)
       : refcount_(1)
       , storage_(storage)
       , storage_offset_(0)
       , sizes_{0}
       , strides_{1}
       , is_zero_dim_(false)
       {}

     ~THTensor() {
       if (storage_) {
         THStorage_free(storage_);
       }
     }
...

Looks like C support is dropped

lxtGH commented 6 years ago

Yes, due to the API changes of pytorch. Here is the PR

gemfield commented 5 years ago

Yes, due to the 0.4.1 API change.

sohee-zoe commented 5 years ago

Hi, I'm not sure what was wrong, but the error disappeared after I reinstalled PyTorch using pip install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl 0.4.1 had been installed when I did: pip install torchvision

thanks, it work for me