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

Add visualdl callback function #27565

Merged
merged 6 commits into from
Sep 30, 2020

Conversation

LielinJiang
Copy link
Contributor

@LielinJiang LielinJiang commented Sep 25, 2020

PR types

New features

PR changes

APIs

Describe

Add visualdl callback function for hapi

image
image

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

writer = getattr(self, '%s_writer' % (mode))
current_step = getattr(self, '%s_step' % (mode))
if mode == 'train':
total_step = self.epoch * self.steps + current_step
Copy link
Contributor

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。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

self.steps = self.params['steps']
self.epoch = epoch
self.train_step = 0
self.train_writer = visualdl.LogWriter(self.log_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要每个epoch开始,重新new一个train_writer吗?

Copy link
Contributor Author

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.

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@saxon-zh saxon-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LielinJiang LielinJiang merged commit a0f1dba into PaddlePaddle:develop Sep 30, 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

Successfully merging this pull request may close these issues.

4 participants