NVlabs / pacnet

Pixel-Adaptive Convolutional Neural Networks (CVPR '19)
https://suhangpro.github.io/pac/
Other
514 stars 79 forks source link

torch 1.4.0 cannot find type2backend #14

Closed pfeatherstone closed 2 years ago

pfeatherstone commented 4 years ago

I think something as been shuffled around in torch. I cannot find type2backend which was previously in torch._thnn in 0.4. Can we port this to torch 1.4.0?

vkothapally commented 4 years ago

I had the same issue. @suhangpro Do you have plans to make it compatible with PyTorch 1.4.0?

suhangpro commented 4 years ago

@pfeatherstone Sorry for the delay. Yes, we definitely plan to bring compatibility to 1.4. Will take a look soon (in the next few days or perhaps a week).

vkothapally commented 4 years ago

@suhangpro Just curious to know if you got a chance to look into this issue

suhangpro commented 4 years ago

There is now a branch "th14" which the test cases pass with pytorch 1.4. Not yet tested with any real experiments though.

vkothapally commented 4 years ago

Thanks a lot for the quick update @suhangpro

KT27-A commented 4 years ago

it seems that ignoring "ctx._backend = type2backend[input.type()]" works fine, could we just ignore it in the new version of Pytorch. BTW, what are we doing by using "ctx._backend = type2backend[input.type()]"? Thanks. @suhangpro @vkothapally

suhangpro commented 4 years ago

@Katou2 Thanks for sharing the observation. That line was originally used in some custom layer examples for exposing low-level functions. If it runs without errors then I think you're right you've found an even easier fix!

EyalRozenberg1 commented 4 years ago

Ignoring this import (as in https://github.com/NVlabs/pacnet/issues/14#issuecomment-622223277) seems to be working for the forward pass but raises errors in backprop.

Using the new branch (https://github.com/NVlabs/pacnet/issues/14#issuecomment-594341872) solved the issue.

scarlett16 commented 4 years ago

Ignoring this import (as in #14 (comment)) seems to be working for the forward pass but raises errors in backprop.

Using the new branch (#14 (comment)) solved the issue.

Sorry to bother you, but i don't know what the new branch(14th) is. Is that a new package or something? Could you please post the link for me? Thank you so much!

EyalRozenberg1 commented 4 years ago

Ignoring this import (as in #14 (comment)) seems to be working for the forward pass but raises errors in backprop. Using the new branch (#14 (comment)) solved the issue.

Sorry to bother you, but i don't know what the new branch(14th) is. Is that a new package or something? Could you please post the link for me? Thank you so much!

Sure, no problem. you can find branch th14 here

EricPengShuai commented 3 years ago

@suhangpro What is the main change of your new branch th14 to solve the problem of type2backend’s missing, can you briefly talk about it? Thanks

suhangpro commented 3 years ago

@EricPengShuai You can check the changes here. backend is no longer exposed and so we changed the implementation to just use the higher level fold function.