-
Notifications
You must be signed in to change notification settings - Fork 23
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
Understanding Gradient Inversion #37
Comments
The Inverted Gradients technique is applied on the back-propagation gradients output of the critic before they are applied to the actor. The relevant code is in dqn.cpp, lines 922-965 ( Line 922 in c7b0a73
I'm implementing a similar algorithm in Keras. I'll be interested in seeing your PyTorch implementation when you have it up and running. |
hi, |
This code is very raw, and it there are some problems with the learning, which is slow and unstable. Specifically, the 4 discrete action values (used to probabilistically select which of the four actions will be executed) eventually all move close to 1.0 and fluctuate slightly, making it too easy for the agent to select the wrong action. The code is available in this repository: And you should be looking at lines 488-507 (https://github.com/wbwatkinson/ddpg-hfo-python/blob/6989b849eb9b90e03fbecaf49463a11505ab92bf/src/ddpg.py#L488). I'm a bit new to Python, so no guarantees that this is pythonic. Also, as mentioned I have at least one error somewhere in the code, but I don't think it is in the inverting gradients algorithm. I welcome any feedback you or anyone has. |
I had an error in the code... corrected now (https://github.com/wbwatkinson/ddpg-hfo-python). Unless there are other questions about the inverting gradients algorithm, I recommend closing this. |
hi, can you tell me which one you correct?? |
I think it would be best to discuss the specifics of the Python code in the other repository. That said, I made two changes that stabilized learning.
|
Sorry, if this appears to be a stupid question. I am trying to implement gradient inversion using PyTorch based on the paper but I would like to ask for some clarifications. Is the inversion done on all the layers? or is it just done on the last layer? If it's the former case, we would have to keep the output of each layer
Thanks a lot for your help in advance
The text was updated successfully, but these errors were encountered: