alexandrosstergiou / SoftPool

[ICCV 2021] Code for approximated exponential maximum pooling
MIT License
288 stars 52 forks source link

Is it possible to use SoftPool on Colab? #26

Closed PolicyWsy closed 3 years ago

PolicyWsy commented 3 years ago

Hi, I installed the package on Colab with the commands you provide. The installation process seemed successful, but when I tried to import soft_pool2d, I got the following error message:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-89f2a448160d> in <module>()
----> 1 from SoftPool import soft_pool2d, SoftPool2d

1 frames
/content/SoftPool/pytorch/SoftPool/idea.py in <module>()
      5 from torch.nn.modules.utils import _triple, _pair, _single
      6 
----> 7 import softpool_cuda
      8 
      9 

ModuleNotFoundError: No module named 'softpool_cuda'

Is there any way to use SoftPool on Colab? Thanks in advance.

alexandrosstergiou commented 3 years ago

Hi @PolicyWsy,

I have not tried using Colab with this project. However, based on the snippet you should first import softpool_cuda and then the PyTorch classes and functions.

Best, Alex

PolicyWsy commented 3 years ago

Hi @alexandrosstergiou, Thanks for your reply. I tried to import softpool_cuda first but ended up with the same error. Anyway, I rewrote softpool by myself and it works well;)

Muzi010 commented 5 months ago

能否分享一下重写以后的softpool