Add visualdl callback function#27565
Merged
LielinJiang merged 6 commits intoPaddlePaddle:developfrom Sep 30, 2020
Merged
Conversation
|
Thanks for your contribution! |
qingqing01
reviewed
Sep 27, 2020
python/paddle/hapi/callbacks.py
Outdated
| writer = getattr(self, '%s_writer' % (mode)) | ||
| current_step = getattr(self, '%s_step' % (mode)) | ||
| if mode == 'train': | ||
| total_step = self.epoch * self.steps + current_step |
Contributor
There was a problem hiding this comment.
total_step可以依据 current_step、以及on_epoch_begin里累加计算,而不用self.epoch * self.steps乘积来计算吧。 因为一些Dataset是iterable方式,预先不知道steps是多少,Model里给的None。
python/paddle/hapi/callbacks.py
Outdated
| self.steps = self.params['steps'] | ||
| self.epoch = epoch | ||
| self.train_step = 0 | ||
| self.train_writer = visualdl.LogWriter(self.log_dir) |
Contributor
There was a problem hiding this comment.
需要每个epoch开始,重新new一个train_writer吗?
Contributor
Author
There was a problem hiding this comment.
done, only create one writer for one callback instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
New features
PR changes
APIs
Describe
Add visualdl callback function for hapi