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

fix bugs in evaluate #59

Merged
merged 4 commits into from
Jun 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flagai/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@ def evaluate(self,
step_output = forward_step_func(data_iterator,
model,
mems=mems)
lm_loss, mems = step_output['loss'], step_output[
'hidden_states']
lm_loss= step_output['loss']
# mems = step_output['hidden_states']
'''when contiguous memory optimizations are enabled, the buffers
allocated by the optimizations are deallocated during backward pass
in the absence of backward pass the buffers should be reset after each
Expand Down