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

How to add custom backward gradients #465

Open
cdcseacave opened this issue Oct 24, 2024 · 2 comments
Open

How to add custom backward gradients #465

cdcseacave opened this issue Oct 24, 2024 · 2 comments

Comments

@cdcseacave
Copy link

Great project, thank you! This is more a cry for help. I'm trying to add new functionality to the forward renderer, which works great, but next I have huge problems understanding how to write the backward pass.

Do you have any suggestions on how to best approach this task?

@YuxinYao620
Copy link

Hi cdcseacave, may I ask have you resolved this problem?

@cdcseacave
Copy link
Author

After a lot of trial and error I think the gradient is computing well now, however I still do not know a good procedure to tackle this task: how to modify/add the derivative in the backward step such that it reflects the forward math changes, and how to best test the changes (I tried using torch.autograd.gradcheck but first of all I had to convert everything to doubles otherwise it does lack accuracy, and even like that it is not obvious if there is a problem how do I spot where in the code it occurs).

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