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 test,visualDL #69

Merged
merged 4 commits into from
Jan 24, 2018
Merged

add test,visualDL #69

merged 4 commits into from
Jan 24, 2018

Conversation

ccmeteorljh
Copy link

1、添加测试数据的准确率;
2、添加VisualDL对训练过程中的loss,acc画图;
3、修改每一轮训练的输出;

@@ -25,6 +26,8 @@ def parse_args():
help='The model architecture.')
parser.add_argument(
'--batch_size', type=int, default=32, help='The minibatch size.')
parser.add_argument(
'--log_dir', '-f', type=str,default='./', help='the path of the log file')
Copy link
Contributor

Choose a reason for hiding this comment

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

default 前有空格; the -> The

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Author

Choose a reason for hiding this comment

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

Done

for pass_id in range(args.pass_num):
every_pass_loss = []
every_pass_acc = []
accuracy.reset(exe)
iter = 0
for batch_id, data in enumerate(train_reader()):
if iter < args.skip_batch_num:
Copy link
Contributor

Choose a reason for hiding this comment

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

args.skip_batch_num 这个参数是跳过第0个pass的前几个batch,是为了跳过训练开始的启动时间。

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Owner

@dzhwinter dzhwinter left a comment

Choose a reason for hiding this comment

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

LGTM

@dzhwinter dzhwinter merged commit 7cbb56d into dzhwinter:master Jan 24, 2018
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.

None yet

3 participants