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

AdaCoF Operation #18

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

AdaCoF Operation #18

repers opened this issue Nov 2, 2022 · 4 comments

Comments

@repers
Copy link

repers commented Nov 2, 2022

Hi, when you were writing the code for AdaCoF in cupy, what software or resources did you use for that, I am trying to understand the cupy/C code, but am currently not sure what to use for debugging to check the outputs at each stage
Thanks

@HyeongminLEE
Copy link
Owner

Hi, thank you for referring to my code.
Do you mean the IDE or Editor I used?

@repers
Copy link
Author

repers commented Nov 9, 2022

Hi, thanks for your response,
So what I would like to know as the adacof.py file contains both python and C code to implement the adacof operation , what toolkits you used to compile and debug this piece of code.
Do you first write the code in C and then adapt for cupy?

@HyeongminLEE
Copy link
Owner

I just wrote C code on sublimetext and it doesn't compile the code, just colorize the code for easy understanding.
cupy automatically compiles the C code when you transfer the code as a string to cupy functions.
Also, cupy points out some syntax errors from the code transferred.
I did not use any other debugging tool.

@repers
Copy link
Author

repers commented Nov 26, 2022

Thanks for your help! I've been trying to understand the code, but am confused about the signs for the final line of updateGradAlpha and updateGradBeta when computing floatoutput,
So for upgradeGradAlpha

      floatOutput += delta * w * (
            - VALUE_4(input, intSample, c, i_k_A, j_l_B)*(1-(beta-(float)B)) + 
            VALUE_4(input, intSample, c, i_k_A_1, j_l_B)*(1-(beta-(float)B)) - 
            VALUE_4(input, intSample, c, i_k_A, j_l_B_1)*(beta-(float)B) + 
            VALUE_4(input, intSample, c, i_k_A_1, j_l_B_1)*(beta-(float)B)
            );
        }

and updateGradBeta:

        floatOutput += delta * w * (
            - VALUE_4(input, intSample, c, i_k_A, j_l_B)*(1-(alpha-(float)A)) - 
            VALUE_4(input, intSample, c, i_k_A_1, j_l_B)*(alpha-(float)A) + 
            VALUE_4(input, intSample, c, i_k_A, j_l_B_1)*(1-(alpha-(float)A)) + 
            VALUE_4(input, intSample, c, i_k_A_1, j_l_B_1)*(alpha-(float)A)
            );
        }

Why is the arrangement of signs - + - + for alpha and for beta - - + +?

Is there any literature which you found useful when writing the AdaCoF operation?

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