Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Print Variable after tape has been backwarded #29

Closed
kexinzhao opened this issue Jun 23, 2018 · 1 comment · Fixed by #34
Closed

Print Variable after tape has been backwarded #29

kexinzhao opened this issue Jun 23, 2018 · 1 comment · Fixed by #34
Assignees

Comments

@kexinzhao
Copy link
Collaborator

There is a common user scenario that user may want to print the value of a grad var after running backward pass.

tape.Backward(loss)
LOG(INFO) << input->Grad().value();

However, since Value() will invoke tape.Forward() and Foward() will throw when the tape has been forwarded, so the above code will throw.

@kexinzhao kexinzhao self-assigned this Jun 23, 2018
@tonyyang-svail
Copy link
Collaborator

@kexinzhao Thanks, this is a good catch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants