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

the update of the hybrid memory #15

Closed
crazydemo opened this issue Oct 21, 2020 · 7 comments
Closed

the update of the hybrid memory #15

crazydemo opened this issue Oct 21, 2020 · 7 comments

Comments

@crazydemo
Copy link

how can i debug the hybrid memory's features. i just change the moemtumn update function to the simple ctx.features = ctx.features +1 . And when i debug the hm.py, the self.features is never changed.

@yxgeee
Copy link
Owner

yxgeee commented Oct 21, 2020

Did you setup the code again (python setup.py install) after you change the code?

@crazydemo
Copy link
Author

Did you setup the code again (python setup.py install) after you change the code?

i did not re-setup the code. But i have tried, whether to setup the code again do nothing to the debuging results. I wonder whether the memory is updated, and how can i see the updates in real time. I have treid to print the self.features in hm.py, but it is not changed.

@yxgeee
Copy link
Owner

yxgeee commented Oct 21, 2020

Did you check the memory after loss backpropagation? Since the features in the memory would be updated when doing loss.backward().

@yxgeee
Copy link
Owner

yxgeee commented Oct 21, 2020

Which means that, you need to print the features after the line of loss.backward() instead of in the forward() of hm.py.

@crazydemo
Copy link
Author

Did you check the memory after loss backpropagation? Since the features in the memory would be updated when doing loss.backward().

it really updates when in the loss.backward(), but in the next iteration, in the forward phase, the memory is kept the same as the initialization. I am confusing that, as the backward has been done, the memory is supposed to be updated in the next iteration, but i cannot see the difference.

@yxgeee
Copy link
Owner

yxgeee commented Oct 21, 2020

Did you print the whole memory? Only a mini-batch's samples would be updated, you need to check whether the corresponding batch has been updated.

@crazydemo
Copy link
Author

I will have more trial, thank you for your time.

@yxgeee yxgeee closed this as completed Oct 31, 2020
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