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

About from SOFT import _c library file problem #8

Open
handsomezhuo opened this issue Nov 2, 2022 · 4 comments
Open

About from SOFT import _c library file problem #8

handsomezhuo opened this issue Nov 2, 2022 · 4 comments

Comments

@handsomezhuo
Copy link

Hello, I read your article and code, but I found an error in the section of from SOFT import _c in the subtraction file, would you please tell me where to find this library

@VictorLlu
Copy link
Collaborator

VictorLlu commented Nov 7, 2022

You may first install SOFT with

python -m pip install -e SOFT

Or, we have provided a pytorch version implementation, you can just delete C-related sentences in Python codes and use our pytorch implementation.

@handsomezhuo
Copy link
Author

I have carefully reviewed the code you provided,for example,
image
After the _c sentence is deleted, there is no way to put key,query and output into the Gaussian kernel for operation at the same time. I haven't found the code about the Gaussian kernel written by pytorch, perhaps I haven't noticed it. Could you please give me a hint? Thank you

@VictorLlu
Copy link
Collaborator

VictorLlu commented Nov 7, 2022

You would better first install SOFT with

python -m pip install -e SOFT

This will solve most of the issues caused by library SOFT.
And then, if you want to avoid using CUDA, please set the parameter --kernel-method as torch.
It will lead to code

if kernel_method == "torch":

You can now delete
from SOFT.kernel.subtraction import subtraction_gaussian_kernel

@handsomezhuo
Copy link
Author

Thanks for your kind instruction, now I can run the program successfully.

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

2 participants