Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: super(type, obj): obj must be an instance or subtype of type #41

Open
kumarshrestha009 opened this issue Aug 28, 2019 · 5 comments

Comments

@kumarshrestha009
Copy link

kumarshrestha009 commented Aug 28, 2019

TypeError
in ()
1 import UnariesNet
----> 2 uNet = UnariesNet.unariesNet()

/home/kumar/DeepOcclusion/UnariesNet.py in init(self, load_pretrained)
80 c53_r = mNet.c53_r
81
---> 82 op = ROIPoolingOp(pooled_h=p_h, pooled_w=p_w, spatial_scale=1.0)
83
84

/home/kumar/DeepOcclusion/roi_pooling.py in init(self, pooled_h, pooled_w, spatial_scale)
18
19 def init(self, pooled_h, pooled_w, spatial_scale):
---> 20 super(ROIPoolingOp, self).init(self.func_file,
21 self.func_name)
22

TypeError: super(type, obj): obj must be an instance or subtype of type

How can i fix this ? Help will be highly appreciated ?

@DhanasekarChellamuthu
Copy link

Hi @kumarshrestha009, before that in same roi_pooling.py 7 th line from theano.sandbox.cuda import as_cuda_ndarray_variable, GpuOp i am getting error like cannot import name 'as_cuda_ndarray_variable' #38. can you help me to resolve this issue
I am having doubt at Dependencies 2 nd point:

You also need to install the theano ROI-Pooling Layer from https://github.com/ddtm/theano-roi-pooling to get the unary potentials to work.

can you comment system dependencies

@kumarshrestha009
Copy link
Author

You can type
import theano.sandbox.cuda as cuda_ndarray_variable

Theano is the main dependency. I had used theano 0.9.

@DhanasekarChellamuthu
Copy link

Thanks for answering @kumarshrestha009 but you said like calling whole package in the name as_cuda_ndarray_variable but in that code it is written as calling one function from that package that both make different meaning right.

@Kirmani66
Copy link

@kumarshrestha009 Did you solved the super(type, obj) issue. If yes please share the solution

@leconghieu99
Copy link

@DhanasekarChellamuthu can you please send me the .zip files. Looks like the link is broken. Email: [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants