1 训练时间统计

训练时间统计

1 引入time模块

import time

2 在epoch循环开头处加入

begin = time.time()

3 在epoch循环末尾处加入

time_cost = time.time() - begin
print('Training complete in {:.0f}m {:.0f}s'.format(time_cost // 60, time_cost % 60))
posted @ 2021-10-03 17:55  SethDeng  阅读(75)  评论(0编辑  收藏  举报