rabeehk / compacter

127 stars 15 forks source link

ImportError: cannot import name 'fast_walsh_hadamard_transform' from 'projections.fwh_cuda' (unknown location) #7

Open akkarimi opened 2 years ago

akkarimi commented 2 years ago

Hi. Thanks for sharing your code.

I'm trying to run your baseline. However, I'm running into this problem:

from projections.fwh_cuda import fast_walsh_hadamard_transform as fast_walsh_hadamard_transform_cuda ImportError: cannot import name 'fast_walsh_hadamard_transform' from 'projections.fwh_cuda' (unknown location)

Could you tell me how I can resolve this issue? Thanks

rabeehk commented 2 years ago

Hi Apologies for the very late response. Please feel free to send me an email also if you dont receive the response. I think you might not have run the install, python setup.py install Could you check if you have run the installation? Best Rabeeh

rabeehk commented 2 years ago

Hi, I will close this ticket, but please do feel free to re-open it or make a new one, if the issue persists Best Rabeeh

akkarimi commented 2 years ago

Thanks for your reply. I actually found out that after the installation, the fwh_cuda can't be seen in the projections folder. So I found the fast_walsh_hadamard_transform function online, and defined it manually in the code. Now it's working but I'm not sure if the code that I replaced for the missing function is the same as yours.

rabeehk commented 2 years ago

Hi @akkarimi I think maybe you need to add that path to the PYTHONPATH? I do not think you need to re-define it, but great it works now. Best Rabeeh

akkarimi commented 2 years ago

Hi @rabeehk I think the path is OK. The fwh_cuda file, which is supposed to be created after installation, is missing.

cloversjtu commented 8 months ago

@akkarimi Hi, may I ask what's your solution to this issue? I faced the same issue as well. Thanks for your help.