-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Empty index_list #2
Comments
I wonder how you configure the parameter ratio and the input tensors. Can you test whether the hook functions are called during the feed-forward and back-propagation? |
-1. I have test it that the register hook function 'hook_fn = self.generate_hook(start_index)' has been run. |
The hook functions are designed as callback functions that collect parameter indices when layerwise inputs/outputs (or gradient inputs/outputs) goes through their own layer. It is hard to figure out the exact reason as I do not see the result output and your code snippet. |
I choice the selection scheme “HighestKGradients” and run the code as follows:
net_parser.register_hooks()
target_loss = (criterion(outputs, labels))
target_loss.backward(retain_graph=True)
index_list = net_parser.get_parameters()
But I found that the index_list is none and the function "hook" in function "generated_hook" from the file "HighestKGradients.py" didn't run.
The text was updated successfully, but these errors were encountered: