-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add visualdl callback function #27565
Conversation
Thanks for your contribution! |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
total_step可以依据 current_step、以及on_epoch_begin里累加计算,而不用self.epoch * self.steps
乘积来计算吧。 因为一些Dataset是iterable方式,预先不知道steps是多少,Model里给的None。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要每个epoch开始,重新new一个train_writer吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, only create one writer for one callback instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
APIs
Describe
Add visualdl callback function for hapi