用PaddlePaddle实现图像分类-MobileNet(动态图版)

项目简介

本项目使用paddle实现图像分类模型 MobileNet-V1网络的训练和预测。MobileNet-V1是针对传统卷积模块计算量大的缺点进行改进后,提出的一种更高效的能够在移动设备上部署的轻量级神经网络。静态图版本请查看:用PaddlePaddle实现图像分类-MobileNet

下载安装命令

## CPU版本安装命令
pip install -f https://paddlepaddle.org.cn/pip/oschina/cpu paddlepaddle

## GPU版本安装命令
pip install -f https://paddlepaddle.org.cn/pip/oschina/gpu paddlepaddle-gpu

模型结构

MobileNet的核心思想是将传统卷积分解为深度可分离卷积与1 x 1卷积。深度可分离卷积是指输入特征图的每个channel都对应一个卷积核,这样输出的特征的每个channel只与输入特征图对应的channel相关,具体的例如输入一个K×M×NK/times M/times NK×M×N的特征图,其中K为特征图的通道数,M、N为特征图的宽高,假设传统卷积需要一个大小为C×K×3×3C/times K/times 3/times 3C×K×3×3的卷积核来得到输出大小为C×M′×N′C/times M^{‘}/times N^{‘}C×M×N的新的特征图。而深度可分离卷积则是首先使用K个大小为3×33/times 33×3的卷积核分别对输入的K个channel进行卷积得到K个特征图(DepthWise Conv部分),然后再使用大小为C×K×1×1C/times K /times 1/times 1C×K×1×1的卷积来得到大小为C×M′×N′C/times M^{‘}/times N^{‘}C×M×N的输出(PointWise Conv部分)。这种卷积操作能够显著的降低模型的大小和计算量,而在性能上能够与标准卷积相当,深度可分离卷积具体的结构如下图。
用PaddlePaddle实现图像分类-MobileNet(动态图版)
假设输入特征图大小为:Cin×Hin×WinC_{in}/times H_{in}/times W_{in}Cin×Hin×Win,使用卷积核为K×KK/times KK×K,输出的特征图大小为Cout×Hout×WoutC_{out}/times H_{out}/times W_{out}Cout×Hout×Wout,对于标准的卷积,其计算量为:
K×K×Cint×Cout×Hout×WoutK/times K/times C_{int}/times C_{out}/times H_{out}/times W_{out}K×K×Cint×Cout×Hout×Wout 
对于分解后的深度可分离卷积,计算量可通过DW部分和PW部分计算量的和得到,公式如下:
K×K×Cint×Hout×Wout+Cint×Cout×Hout×WoutK/times K/times C_{int}/times H_{out}/times W_{out} + C_{int}/times C_{out}/times H_{out}/times W_{out}K×K×Cint×Hout×Wout+Cint×Cout×Hout×Wout 
因此相比于标准卷积,深度可分离卷积的计算量降低了:
K×K×Cint×Hout×Wout+Cint×Cout×Hout×WoutK×K×Cint×Cout×Hout×Wout=1Cout+1K2/frac{K/times K/times C_{int}/times H_{out}/times W_{out} + C_{int}/times C_{out}/times H_{out}/times W_{out}}{K/times K/times C_{int}/times C_{out}/times H_{out}/times W_{out}}= /frac{1}{C_{out}} + /frac{1}{K^2}K×K×Cint×Cout×Hout×WoutK×K×Cint×Hout×Wout+Cint×Cout×Hout×Wout=Cout1+K21 
由上式可知,对于一个大小为3×33/times 33×3的卷积核,计算量降低了约7-9倍。
MobileNet-V1的网络结构比较简单直观,采用VGG类似的直筒型结构,具体结构如下表:
用PaddlePaddle实现图像分类-MobileNet(动态图版)

参考链接

论文原文:MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications
参考博客:深度学习之MobileNetV1

数据介绍

使用公开鲜花据集,数据集压缩包里包含五个文件夹,每个文件夹一种花卉。分别是雏菊,蒲公英,玫瑰,向日葵,郁金香。每种各690-890张不等

In[ ]

# 解压花朵数据集 !cd data/data2815 && unzip -qo flower_photos.zip

 

预处理数据,将其转化为需要的格式

In[ ]

# 预处理数据,将其转化为标准格式。同时将数据拆分成两份,以便训练和计算预估准确率 import codecs import os import random import shutil from PIL import Image train_ratio = 4.0 / 5 all_file_dir = 'data/data2815' class_list = [c for c in os.listdir(all_file_dir) if os.path.isdir(os.path.join(all_file_dir, c)) and not c.endswith('Set') and not c.startswith('.')] class_list.sort() print(class_list) train_image_dir = os.path.join(all_file_dir, "trainImageSet") if not os.path.exists(train_image_dir): os.makedirs(train_image_dir) eval_image_dir = os.path.join(all_file_dir, "evalImageSet") if not os.path.exists(eval_image_dir): os.makedirs(eval_image_dir) train_file = codecs.open(os.path.join(all_file_dir, "train.txt"), 'w') eval_file = codecs.open(os.path.join(all_file_dir, "eval.txt"), 'w') with codecs.open(os.path.join(all_file_dir, "label_list.txt"), "w") as label_list: label_id = 0 for class_dir in class_list: label_list.write("{0}/t{1}/n".format(label_id, class_dir)) image_path_pre = os.path.join(all_file_dir, class_dir) for file in os.listdir(image_path_pre): try: img = Image.open(os.path.join(image_path_pre, file)) if random.uniform(0, 1) <= train_ratio: shutil.copyfile(os.path.join(image_path_pre, file), os.path.join(train_image_dir, file)) train_file.write("{0}/t{1}/n".format(os.path.join(train_image_dir, file), label_id)) else: shutil.copyfile(os.path.join(image_path_pre, file), os.path.join(eval_image_dir, file)) eval_file.write("{0}/t{1}/n".format(os.path.join(eval_image_dir, file), label_id)) except Exception as e: pass # 存在一些文件打不开,此处需要稍作清洗 label_id += 1 train_file.close() eval_file.close()
['daisy', 'dandelion', 'roses', 'sunflowers', 'tulips'] 

 

训练主体

In[9]

!python work/train.py
2020-03-09 11:01:38,973-INFO: input_size: [3, 224, 224] [2020-03-09 11:01:38,973.973] config.py [line:77] INFO: input_size: [3, 224, 224] 2020-03-09 11:01:38,974-INFO: class_dim: 5 [2020-03-09 11:01:38,974.974] config.py [line:78] INFO: class_dim: 5 2020-03-09 11:01:38,974-INFO: continue_train: True [2020-03-09 11:01:38,974.974] config.py [line:79] INFO: continue_train: True 2020-03-09 11:01:38,974-INFO: train_image_count: 2931 [2020-03-09 11:01:38,974.974] config.py [line:80] INFO: train_image_count: 2931 2020-03-09 11:01:38,974-INFO: eval_image_count: 739 [2020-03-09 11:01:38,974.974] config.py [line:81] INFO: eval_image_count: 739 2020-03-09 11:01:38,974-INFO: num_epochs: 20 [2020-03-09 11:01:38,974.974] config.py [line:82] INFO: num_epochs: 20 2020-03-09 11:01:38,974-INFO: train_batch_size: 64 [2020-03-09 11:01:38,974.974] config.py [line:83] INFO: train_batch_size: 64 2020-03-09 11:01:38,974-INFO: mean_rgb: [127.5, 127.5, 127.5] [2020-03-09 11:01:38,974.974] config.py [line:84] INFO: mean_rgb: [127.5, 127.5, 127.5] 2020-03-09 11:01:38,974-INFO: save_model_dir: ./model-params/net [2020-03-09 11:01:38,974.974] config.py [line:85] INFO: save_model_dir: ./model-params/net 2020-03-09 11:01:38,975-INFO: start train [2020-03-09 11:01:38,975.975] train.py [line:60] INFO: start train W0309 11:01:39.770303 453 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 10.1, Runtime API Version: 9.0 W0309 11:01:39.774286 453 device_context.cc:245] device: 0, cuDNN Version: 7.3. 2020-03-09 11:01:41,365-INFO: use Adam optimizer [2020-03-09 11:01:41,365.365] train.py [line:32] INFO: use Adam optimizer 2020-03-09 11:01:41,365-INFO: load params from ./model-params/net [2020-03-09 11:01:41,365.365] train.py [line:44] INFO: load params from ./model-params/net 2020-03-09 11:01:45,784-INFO: loss at epoch 0 step 5: [1.5807192], acc: [0.375] [2020-03-09 11:01:45,784.784] train.py [line:101] INFO: loss at epoch 0 step 5: [1.5807192], acc: [0.375] 2020-03-09 11:01:49,494-INFO: loss at epoch 0 step 10: [1.7167795], acc: [0.25] [2020-03-09 11:01:49,494.494] train.py [line:101] INFO: loss at epoch 0 step 10: [1.7167795], acc: [0.25] 2020-03-09 11:01:53,186-INFO: loss at epoch 0 step 15: [1.6798092], acc: [0.265625] [2020-03-09 11:01:53,186.186] train.py [line:101] INFO: loss at epoch 0 step 15: [1.6798092], acc: [0.265625] 2020-03-09 11:01:57,000-INFO: loss at epoch 0 step 20: [1.6770838], acc: [0.203125] [2020-03-09 11:01:57,000.000] train.py [line:101] INFO: loss at epoch 0 step 20: [1.6770838], acc: [0.203125] 2020-03-09 11:02:00,544-INFO: loss at epoch 0 step 25: [1.7098737], acc: [0.25] [2020-03-09 11:02:00,544.544] train.py [line:101] INFO: loss at epoch 0 step 25: [1.7098737], acc: [0.25] 2020-03-09 11:02:04,212-INFO: loss at epoch 0 step 30: [1.6762378], acc: [0.21875] [2020-03-09 11:02:04,212.212] train.py [line:101] INFO: loss at epoch 0 step 30: [1.6762378], acc: [0.21875] 2020-03-09 11:02:07,996-INFO: loss at epoch 0 step 35: [1.6597308], acc: [0.203125] [2020-03-09 11:02:07,996.996] train.py [line:101] INFO: loss at epoch 0 step 35: [1.6597308], acc: [0.203125] 2020-03-09 11:02:11,621-INFO: loss at epoch 0 step 40: [1.6960915], acc: [0.1875] [2020-03-09 11:02:11,621.621] train.py [line:101] INFO: loss at epoch 0 step 40: [1.6960915], acc: [0.1875] 2020-03-09 11:02:15,042-INFO: epoch 0 acc: [0.23645833] [2020-03-09 11:02:15,042.042] train.py [line:104] INFO: epoch 0 acc: [0.23645833] 2020-03-09 11:02:15,042-INFO: current epoch 0 acc: [0.23645833] better than last acc: 0.0, save model [2020-03-09 11:02:15,042.042] train.py [line:107] INFO: current epoch 0 acc: [0.23645833] better than last acc: 0.0, save model 2020-03-09 11:02:19,722-INFO: loss at epoch 1 step 5: [1.7212887], acc: [0.1875] [2020-03-09 11:02:19,722.722] train.py [line:101] INFO: loss at epoch 1 step 5: [1.7212887], acc: [0.1875] 2020-03-09 11:02:23,397-INFO: loss at epoch 1 step 10: [1.6831031], acc: [0.171875] [2020-03-09 11:02:23,397.397] train.py [line:101] INFO: loss at epoch 1 step 10: [1.6831031], acc: [0.171875] 2020-03-09 11:02:27,123-INFO: loss at epoch 1 step 15: [1.6755635], acc: [0.171875] [2020-03-09 11:02:27,123.123] train.py [line:101] INFO: loss at epoch 1 step 15: [1.6755635], acc: [0.171875] 2020-03-09 11:02:30,737-INFO: loss at epoch 1 step 20: [1.5729047], acc: [0.265625] [2020-03-09 11:02:30,737.737] train.py [line:101] INFO: loss at epoch 1 step 20: [1.5729047], acc: [0.265625] 2020-03-09 11:02:34,289-INFO: loss at epoch 1 step 25: [1.6038525], acc: [0.21875] [2020-03-09 11:02:34,289.289] train.py [line:101] INFO: loss at epoch 1 step 25: [1.6038525], acc: [0.21875] 2020-03-09 11:02:37,963-INFO: loss at epoch 1 step 30: [1.658503], acc: [0.296875] [2020-03-09 11:02:37,963.963] train.py [line:101] INFO: loss at epoch 1 step 30: [1.658503], acc: [0.296875] 2020-03-09 11:02:41,826-INFO: loss at epoch 1 step 35: [1.7511091], acc: [0.171875] [2020-03-09 11:02:41,826.826] train.py [line:101] INFO: loss at epoch 1 step 35: [1.7511091], acc: [0.171875] 2020-03-09 11:02:45,404-INFO: loss at epoch 1 step 40: [1.6101465], acc: [0.25] [2020-03-09 11:02:45,404.404] train.py [line:101] INFO: loss at epoch 1 step 40: [1.6101465], acc: [0.25] 2020-03-09 11:02:48,906-INFO: epoch 1 acc: [0.23541667] [2020-03-09 11:02:48,906.906] train.py [line:104] INFO: epoch 1 acc: [0.23541667] 2020-03-09 11:02:53,269-INFO: loss at epoch 2 step 5: [1.6803914], acc: [0.21875] [2020-03-09 11:02:53,269.269] train.py [line:101] INFO: loss at epoch 2 step 5: [1.6803914], acc: [0.21875] 2020-03-09 11:02:56,578-INFO: loss at epoch 2 step 10: [1.6602635], acc: [0.21875] [2020-03-09 11:02:56,578.578] train.py [line:101] INFO: loss at epoch 2 step 10: [1.6602635], acc: [0.21875] 2020-03-09 11:03:00,252-INFO: loss at epoch 2 step 15: [1.5998487], acc: [0.234375] [2020-03-09 11:03:00,252.252] train.py [line:101] INFO: loss at epoch 2 step 15: [1.5998487], acc: [0.234375] 2020-03-09 11:03:03,947-INFO: loss at epoch 2 step 20: [1.6906643], acc: [0.171875] [2020-03-09 11:03:03,947.947] train.py [line:101] INFO: loss at epoch 2 step 20: [1.6906643], acc: [0.171875] 2020-03-09 11:03:07,377-INFO: loss at epoch 2 step 25: [1.6618086], acc: [0.1875] [2020-03-09 11:03:07,377.377] train.py [line:101] INFO: loss at epoch 2 step 25: [1.6618086], acc: [0.1875] 2020-03-09 11:03:11,130-INFO: loss at epoch 2 step 30: [1.6523752], acc: [0.109375] [2020-03-09 11:03:11,130.130] train.py [line:101] INFO: loss at epoch 2 step 30: [1.6523752], acc: [0.109375] 2020-03-09 11:03:14,784-INFO: loss at epoch 2 step 35: [1.6382456], acc: [0.265625] [2020-03-09 11:03:14,784.784] train.py [line:101] INFO: loss at epoch 2 step 35: [1.6382456], acc: [0.265625] 2020-03-09 11:03:18,520-INFO: loss at epoch 2 step 40: [1.6952755], acc: [0.203125] [2020-03-09 11:03:18,520.520] train.py [line:101] INFO: loss at epoch 2 step 40: [1.6952755], acc: [0.203125] 2020-03-09 11:03:21,832-INFO: epoch 2 acc: [0.22569445] [2020-03-09 11:03:21,832.832] train.py [line:104] INFO: epoch 2 acc: [0.22569445] 2020-03-09 11:03:26,282-INFO: loss at epoch 3 step 5: [1.6145399], acc: [0.25] [2020-03-09 11:03:26,282.282] train.py [line:101] INFO: loss at epoch 3 step 5: [1.6145399], acc: [0.25] 2020-03-09 11:03:29,827-INFO: loss at epoch 3 step 10: [1.6579199], acc: [0.265625] [2020-03-09 11:03:29,827.827] train.py [line:101] INFO: loss at epoch 3 step 10: [1.6579199], acc: [0.265625] 2020-03-09 11:03:33,388-INFO: loss at epoch 3 step 15: [1.6076391], acc: [0.203125] [2020-03-09 11:03:33,388.388] train.py [line:101] INFO: loss at epoch 3 step 15: [1.6076391], acc: [0.203125] 2020-03-09 11:03:36,901-INFO: loss at epoch 3 step 20: [1.6451449], acc: [0.171875] [2020-03-09 11:03:36,901.901] train.py [line:101] INFO: loss at epoch 3 step 20: [1.6451449], acc: [0.171875] 2020-03-09 11:03:40,565-INFO: loss at epoch 3 step 25: [1.6458361], acc: [0.21875] [2020-03-09 11:03:40,565.565] train.py [line:101] INFO: loss at epoch 3 step 25: [1.6458361], acc: [0.21875] 2020-03-09 11:03:44,070-INFO: loss at epoch 3 step 30: [1.5419782], acc: [0.21875] [2020-03-09 11:03:44,070.070] train.py [line:101] INFO: loss at epoch 3 step 30: [1.5419782], acc: [0.21875] 2020-03-09 11:03:47,922-INFO: loss at epoch 3 step 35: [1.6265318], acc: [0.25] [2020-03-09 11:03:47,922.922] train.py [line:101] INFO: loss at epoch 3 step 35: [1.6265318], acc: [0.25] 2020-03-09 11:03:51,731-INFO: loss at epoch 3 step 40: [1.676601], acc: [0.203125] [2020-03-09 11:03:51,731.731] train.py [line:101] INFO: loss at epoch 3 step 40: [1.676601], acc: [0.203125] 2020-03-09 11:03:55,113-INFO: epoch 3 acc: [0.22256945] [2020-03-09 11:03:55,113.113] train.py [line:104] INFO: epoch 3 acc: [0.22256945] 2020-03-09 11:03:59,332-INFO: loss at epoch 4 step 5: [1.6363196], acc: [0.296875] [2020-03-09 11:03:59,332.332] train.py [line:101] INFO: loss at epoch 4 step 5: [1.6363196], acc: [0.296875] 2020-03-09 11:04:02,860-INFO: loss at epoch 4 step 10: [1.6390615], acc: [0.203125] [2020-03-09 11:04:02,860.860] train.py [line:101] INFO: loss at epoch 4 step 10: [1.6390615], acc: [0.203125] 2020-03-09 11:04:06,307-INFO: loss at epoch 4 step 15: [1.58377], acc: [0.265625] [2020-03-09 11:04:06,307.307] train.py [line:101] INFO: loss at epoch 4 step 15: [1.58377], acc: [0.265625] 2020-03-09 11:04:09,820-INFO: loss at epoch 4 step 20: [1.6172626], acc: [0.171875] [2020-03-09 11:04:09,820.820] train.py [line:101] INFO: loss at epoch 4 step 20: [1.6172626], acc: [0.171875] 2020-03-09 11:04:13,376-INFO: loss at epoch 4 step 25: [1.6122296], acc: [0.203125] [2020-03-09 11:04:13,376.376] train.py [line:101] INFO: loss at epoch 4 step 25: [1.6122296], acc: [0.203125] 2020-03-09 11:04:16,899-INFO: loss at epoch 4 step 30: [1.6661325], acc: [0.125] [2020-03-09 11:04:16,899.899] train.py [line:101] INFO: loss at epoch 4 step 30: [1.6661325], acc: [0.125] 2020-03-09 11:04:20,641-INFO: loss at epoch 4 step 35: [1.6417165], acc: [0.15625] [2020-03-09 11:04:20,641.641] train.py [line:101] INFO: loss at epoch 4 step 35: [1.6417165], acc: [0.15625] 2020-03-09 11:04:24,336-INFO: loss at epoch 4 step 40: [1.6198566], acc: [0.265625] [2020-03-09 11:04:24,336.336] train.py [line:101] INFO: loss at epoch 4 step 40: [1.6198566], acc: [0.265625] 2020-03-09 11:04:27,693-INFO: epoch 4 acc: [0.23402777] [2020-03-09 11:04:27,693.693] train.py [line:104] INFO: epoch 4 acc: [0.23402777] 2020-03-09 11:04:31,979-INFO: loss at epoch 5 step 5: [1.6237041], acc: [0.1875] [2020-03-09 11:04:31,979.979] train.py [line:101] INFO: loss at epoch 5 step 5: [1.6237041], acc: [0.1875] 2020-03-09 11:04:35,609-INFO: loss at epoch 5 step 10: [1.6136518], acc: [0.28125] [2020-03-09 11:04:35,609.609] train.py [line:101] INFO: loss at epoch 5 step 10: [1.6136518], acc: [0.28125] 2020-03-09 11:04:39,171-INFO: loss at epoch 5 step 15: [1.6413829], acc: [0.21875] [2020-03-09 11:04:39,171.171] train.py [line:101] INFO: loss at epoch 5 step 15: [1.6413829], acc: [0.21875] 2020-03-09 11:04:42,944-INFO: loss at epoch 5 step 20: [1.6353745], acc: [0.234375] [2020-03-09 11:04:42,944.944] train.py [line:101] INFO: loss at epoch 5 step 20: [1.6353745], acc: [0.234375] 2020-03-09 11:04:46,598-INFO: loss at epoch 5 step 25: [1.652323], acc: [0.1875] [2020-03-09 11:04:46,598.598] train.py [line:101] INFO: loss at epoch 5 step 25: [1.652323], acc: [0.1875] 2020-03-09 11:04:50,127-INFO: loss at epoch 5 step 30: [1.5999035], acc: [0.25] [2020-03-09 11:04:50,127.127] train.py [line:101] INFO: loss at epoch 5 step 30: [1.5999035], acc: [0.25] 2020-03-09 11:04:53,591-INFO: loss at epoch 5 step 35: [1.6060382], acc: [0.265625] [2020-03-09 11:04:53,591.591] train.py [line:101] INFO: loss at epoch 5 step 35: [1.6060382], acc: [0.265625] 2020-03-09 11:04:56,982-INFO: loss at epoch 5 step 40: [1.6233464], acc: [0.234375] [2020-03-09 11:04:56,982.982] train.py [line:101] INFO: loss at epoch 5 step 40: [1.6233464], acc: [0.234375] 2020-03-09 11:05:00,363-INFO: epoch 5 acc: [0.23506944] [2020-03-09 11:05:00,363.363] train.py [line:104] INFO: epoch 5 acc: [0.23506944] 2020-03-09 11:05:04,598-INFO: loss at epoch 6 step 5: [1.6829932], acc: [0.1875] [2020-03-09 11:05:04,598.598] train.py [line:101] INFO: loss at epoch 6 step 5: [1.6829932], acc: [0.1875] 2020-03-09 11:05:08,023-INFO: loss at epoch 6 step 10: [1.6713198], acc: [0.203125] [2020-03-09 11:05:08,023.023] train.py [line:101] INFO: loss at epoch 6 step 10: [1.6713198], acc: [0.203125] 2020-03-09 11:05:11,681-INFO: loss at epoch 6 step 15: [1.5922108], acc: [0.203125] [2020-03-09 11:05:11,681.681] train.py [line:101] INFO: loss at epoch 6 step 15: [1.5922108], acc: [0.203125] 2020-03-09 11:05:15,147-INFO: loss at epoch 6 step 20: [1.5891291], acc: [0.296875] [2020-03-09 11:05:15,147.147] train.py [line:101] INFO: loss at epoch 6 step 20: [1.5891291], acc: [0.296875] 2020-03-09 11:05:18,717-INFO: loss at epoch 6 step 25: [1.5911794], acc: [0.25] [2020-03-09 11:05:18,717.717] train.py [line:101] INFO: loss at epoch 6 step 25: [1.5911794], acc: [0.25] 2020-03-09 11:05:22,219-INFO: loss at epoch 6 step 30: [1.6505113], acc: [0.125] [2020-03-09 11:05:22,219.219] train.py [line:101] INFO: loss at epoch 6 step 30: [1.6505113], acc: [0.125] 2020-03-09 11:05:25,859-INFO: loss at epoch 6 step 35: [1.6143998], acc: [0.234375] [2020-03-09 11:05:25,859.859] train.py [line:101] INFO: loss at epoch 6 step 35: [1.6143998], acc: [0.234375] 2020-03-09 11:05:29,379-INFO: loss at epoch 6 step 40: [1.6146063], acc: [0.125] [2020-03-09 11:05:29,379.379] train.py [line:101] INFO: loss at epoch 6 step 40: [1.6146063], acc: [0.125] 2020-03-09 11:05:32,737-INFO: epoch 6 acc: [0.22013889] [2020-03-09 11:05:32,737.737] train.py [line:104] INFO: epoch 6 acc: [0.22013889] 2020-03-09 11:05:37,052-INFO: loss at epoch 7 step 5: [1.6437659], acc: [0.21875] [2020-03-09 11:05:37,052.052] train.py [line:101] INFO: loss at epoch 7 step 5: [1.6437659], acc: [0.21875] 2020-03-09 11:05:40,577-INFO: loss at epoch 7 step 10: [1.569443], acc: [0.25] [2020-03-09 11:05:40,577.577] train.py [line:101] INFO: loss at epoch 7 step 10: [1.569443], acc: [0.25] 2020-03-09 11:05:44,131-INFO: loss at epoch 7 step 15: [1.6087514], acc: [0.21875] [2020-03-09 11:05:44,131.131] train.py [line:101] INFO: loss at epoch 7 step 15: [1.6087514], acc: [0.21875] 2020-03-09 11:05:47,531-INFO: loss at epoch 7 step 20: [1.6173587], acc: [0.203125] [2020-03-09 11:05:47,531.531] train.py [line:101] INFO: loss at epoch 7 step 20: [1.6173587], acc: [0.203125] 2020-03-09 11:05:51,018-INFO: loss at epoch 7 step 25: [1.6121621], acc: [0.203125] [2020-03-09 11:05:51,018.018] train.py [line:101] INFO: loss at epoch 7 step 25: [1.6121621], acc: [0.203125] 2020-03-09 11:05:54,518-INFO: loss at epoch 7 step 30: [1.6278024], acc: [0.109375] [2020-03-09 11:05:54,518.518] train.py [line:101] INFO: loss at epoch 7 step 30: [1.6278024], acc: [0.109375] 2020-03-09 11:05:57,981-INFO: loss at epoch 7 step 35: [1.5875206], acc: [0.21875] [2020-03-09 11:05:57,981.981] train.py [line:101] INFO: loss at epoch 7 step 35: [1.5875206], acc: [0.21875] 2020-03-09 11:06:01,452-INFO: loss at epoch 7 step 40: [1.6015875], acc: [0.21875] [2020-03-09 11:06:01,452.452] train.py [line:101] INFO: loss at epoch 7 step 40: [1.6015875], acc: [0.21875] 2020-03-09 11:06:04,756-INFO: epoch 7 acc: [0.22708334] [2020-03-09 11:06:04,756.756] train.py [line:104] INFO: epoch 7 acc: [0.22708334] 2020-03-09 11:06:08,964-INFO: loss at epoch 8 step 5: [1.59182], acc: [0.28125] [2020-03-09 11:06:08,964.964] train.py [line:101] INFO: loss at epoch 8 step 5: [1.59182], acc: [0.28125] 2020-03-09 11:06:12,580-INFO: loss at epoch 8 step 10: [1.6335105], acc: [0.21875] [2020-03-09 11:06:12,580.580] train.py [line:101] INFO: loss at epoch 8 step 10: [1.6335105], acc: [0.21875] 2020-03-09 11:06:16,121-INFO: loss at epoch 8 step 15: [1.6089315], acc: [0.234375] [2020-03-09 11:06:16,121.121] train.py [line:101] INFO: loss at epoch 8 step 15: [1.6089315], acc: [0.234375] 2020-03-09 11:06:19,633-INFO: loss at epoch 8 step 20: [1.5758556], acc: [0.25] [2020-03-09 11:06:19,633.633] train.py [line:101] INFO: loss at epoch 8 step 20: [1.5758556], acc: [0.25] 2020-03-09 11:06:23,171-INFO: loss at epoch 8 step 25: [1.6121068], acc: [0.140625] [2020-03-09 11:06:23,171.171] train.py [line:101] INFO: loss at epoch 8 step 25: [1.6121068], acc: [0.140625] 2020-03-09 11:06:26,706-INFO: loss at epoch 8 step 30: [1.5330932], acc: [0.296875] [2020-03-09 11:06:26,706.706] train.py [line:101] INFO: loss at epoch 8 step 30: [1.5330932], acc: [0.296875] 2020-03-09 11:06:30,141-INFO: loss at epoch 8 step 35: [1.5932933], acc: [0.265625] [2020-03-09 11:06:30,141.141] train.py [line:101] INFO: loss at epoch 8 step 35: [1.5932933], acc: [0.265625] 2020-03-09 11:06:34,056-INFO: loss at epoch 8 step 40: [1.6339699], acc: [0.171875] [2020-03-09 11:06:34,056.056] train.py [line:101] INFO: loss at epoch 8 step 40: [1.6339699], acc: [0.171875] 2020-03-09 11:06:37,166-INFO: epoch 8 acc: [0.21909723] [2020-03-09 11:06:37,166.166] train.py [line:104] INFO: epoch 8 acc: [0.21909723] 2020-03-09 11:06:41,434-INFO: loss at epoch 9 step 5: [1.6065611], acc: [0.25] [2020-03-09 11:06:41,434.434] train.py [line:101] INFO: loss at epoch 9 step 5: [1.6065611], acc: [0.25] 2020-03-09 11:06:44,994-INFO: loss at epoch 9 step 10: [1.5875123], acc: [0.328125] [2020-03-09 11:06:44,994.994] train.py [line:101] INFO: loss at epoch 9 step 10: [1.5875123], acc: [0.328125] 2020-03-09 11:06:48,487-INFO: loss at epoch 9 step 15: [1.6383483], acc: [0.1875] [2020-03-09 11:06:48,487.487] train.py [line:101] INFO: loss at epoch 9 step 15: [1.6383483], acc: [0.1875] 2020-03-09 11:06:52,012-INFO: loss at epoch 9 step 20: [1.6354198], acc: [0.15625] [2020-03-09 11:06:52,012.012] train.py [line:101] INFO: loss at epoch 9 step 20: [1.6354198], acc: [0.15625] 2020-03-09 11:06:55,397-INFO: loss at epoch 9 step 25: [1.6039982], acc: [0.203125] [2020-03-09 11:06:55,397.397] train.py [line:101] INFO: loss at epoch 9 step 25: [1.6039982], acc: [0.203125] 2020-03-09 11:06:58,962-INFO: loss at epoch 9 step 30: [1.5817487], acc: [0.265625] [2020-03-09 11:06:58,962.962] train.py [line:101] INFO: loss at epoch 9 step 30: [1.5817487], acc: [0.265625] 2020-03-09 11:07:02,391-INFO: loss at epoch 9 step 35: [1.5912917], acc: [0.328125] [2020-03-09 11:07:02,391.391] train.py [line:101] INFO: loss at epoch 9 step 35: [1.5912917], acc: [0.328125] 2020-03-09 11:07:05,875-INFO: loss at epoch 9 step 40: [1.6329429], acc: [0.21875] [2020-03-09 11:07:05,875.875] train.py [line:101] INFO: loss at epoch 9 step 40: [1.6329429], acc: [0.21875] 2020-03-09 11:07:09,282-INFO: epoch 9 acc: [0.23194444] [2020-03-09 11:07:09,282.282] train.py [line:104] INFO: epoch 9 acc: [0.23194444] 2020-03-09 11:07:13,471-INFO: loss at epoch 10 step 5: [1.6130247], acc: [0.15625] [2020-03-09 11:07:13,471.471] train.py [line:101] INFO: loss at epoch 10 step 5: [1.6130247], acc: [0.15625] 2020-03-09 11:07:17,225-INFO: loss at epoch 10 step 10: [1.5808299], acc: [0.25] [2020-03-09 11:07:17,225.225] train.py [line:101] INFO: loss at epoch 10 step 10: [1.5808299], acc: [0.25] 2020-03-09 11:07:20,885-INFO: loss at epoch 10 step 15: [1.6227539], acc: [0.203125] [2020-03-09 11:07:20,885.885] train.py [line:101] INFO: loss at epoch 10 step 15: [1.6227539], acc: [0.203125] 2020-03-09 11:07:24,526-INFO: loss at epoch 10 step 20: [1.6242977], acc: [0.203125] [2020-03-09 11:07:24,526.526] train.py [line:101] INFO: loss at epoch 10 step 20: [1.6242977], acc: [0.203125] 2020-03-09 11:07:28,062-INFO: loss at epoch 10 step 25: [1.6277459], acc: [0.21875] [2020-03-09 11:07:28,062.062] train.py [line:101] INFO: loss at epoch 10 step 25: [1.6277459], acc: [0.21875] 2020-03-09 11:07:31,770-INFO: loss at epoch 10 step 30: [1.6202403], acc: [0.21875] [2020-03-09 11:07:31,770.770] train.py [line:101] INFO: loss at epoch 10 step 30: [1.6202403], acc: [0.21875] 2020-03-09 11:07:35,417-INFO: loss at epoch 10 step 35: [1.5863875], acc: [0.3125] [2020-03-09 11:07:35,417.417] train.py [line:101] INFO: loss at epoch 10 step 35: [1.5863875], acc: [0.3125] 2020-03-09 11:07:39,120-INFO: loss at epoch 10 step 40: [1.6185999], acc: [0.21875] [2020-03-09 11:07:39,120.120] train.py [line:101] INFO: loss at epoch 10 step 40: [1.6185999], acc: [0.21875] 2020-03-09 11:07:42,408-INFO: epoch 10 acc: [0.24166666] [2020-03-09 11:07:42,408.408] train.py [line:104] INFO: epoch 10 acc: [0.24166666] 2020-03-09 11:07:42,408-INFO: current epoch 10 acc: [0.24166666] better than last acc: [0.23645833], save model [2020-03-09 11:07:42,408.408] train.py [line:107] INFO: current epoch 10 acc: [0.24166666] better than last acc: [0.23645833], save model 2020-03-09 11:07:47,032-INFO: loss at epoch 11 step 5: [1.5864658], acc: [0.296875] [2020-03-09 11:07:47,032.032] train.py [line:101] INFO: loss at epoch 11 step 5: [1.5864658], acc: [0.296875] 2020-03-09 11:07:50,702-INFO: loss at epoch 11 step 10: [1.5968795], acc: [0.296875] [2020-03-09 11:07:50,702.702] train.py [line:101] INFO: loss at epoch 11 step 10: [1.5968795], acc: [0.296875] 2020-03-09 11:07:54,447-INFO: loss at epoch 11 step 15: [1.6012664], acc: [0.25] [2020-03-09 11:07:54,447.447] train.py [line:101] INFO: loss at epoch 11 step 15: [1.6012664], acc: [0.25] 2020-03-09 11:07:58,330-INFO: loss at epoch 11 step 20: [1.615057], acc: [0.265625] [2020-03-09 11:07:58,330.330] train.py [line:101] INFO: loss at epoch 11 step 20: [1.615057], acc: [0.265625] 2020-03-09 11:08:02,060-INFO: loss at epoch 11 step 25: [1.6315539], acc: [0.1875] [2020-03-09 11:08:02,060.060] train.py [line:101] INFO: loss at epoch 11 step 25: [1.6315539], acc: [0.1875] 2020-03-09 11:08:05,495-INFO: loss at epoch 11 step 30: [1.6029904], acc: [0.25] [2020-03-09 11:08:05,495.495] train.py [line:101] INFO: loss at epoch 11 step 30: [1.6029904], acc: [0.25] 2020-03-09 11:08:09,063-INFO: loss at epoch 11 step 35: [1.5812914], acc: [0.359375] [2020-03-09 11:08:09,063.063] train.py [line:101] INFO: loss at epoch 11 step 35: [1.5812914], acc: [0.359375] 2020-03-09 11:08:12,739-INFO: loss at epoch 11 step 40: [1.5968044], acc: [0.21875] [2020-03-09 11:08:12,739.739] train.py [line:101] INFO: loss at epoch 11 step 40: [1.5968044], acc: [0.21875] 2020-03-09 11:08:16,132-INFO: epoch 11 acc: [0.25034723] [2020-03-09 11:08:16,132.132] train.py [line:104] INFO: epoch 11 acc: [0.25034723] 2020-03-09 11:08:16,132-INFO: current epoch 11 acc: [0.25034723] better than last acc: [0.24166666], save model [2020-03-09 11:08:16,132.132] train.py [line:107] INFO: current epoch 11 acc: [0.25034723] better than last acc: [0.24166666], save model 2020-03-09 11:08:20,607-INFO: loss at epoch 12 step 5: [1.6739129], acc: [0.203125] [2020-03-09 11:08:20,607.607] train.py [line:101] INFO: loss at epoch 12 step 5: [1.6739129], acc: [0.203125] 2020-03-09 11:08:24,498-INFO: loss at epoch 12 step 10: [1.5688193], acc: [0.34375] [2020-03-09 11:08:24,498.498] train.py [line:101] INFO: loss at epoch 12 step 10: [1.5688193], acc: [0.34375] 2020-03-09 11:08:28,105-INFO: loss at epoch 12 step 15: [1.5926967], acc: [0.34375] [2020-03-09 11:08:28,105.105] train.py [line:101] INFO: loss at epoch 12 step 15: [1.5926967], acc: [0.34375] 2020-03-09 11:08:31,700-INFO: loss at epoch 12 step 20: [1.6087003], acc: [0.203125] [2020-03-09 11:08:31,700.700] train.py [line:101] INFO: loss at epoch 12 step 20: [1.6087003], acc: [0.203125] 2020-03-09 11:08:35,336-INFO: loss at epoch 12 step 25: [1.6298337], acc: [0.203125] [2020-03-09 11:08:35,336.336] train.py [line:101] INFO: loss at epoch 12 step 25: [1.6298337], acc: [0.203125] 2020-03-09 11:08:39,167-INFO: loss at epoch 12 step 30: [1.5811844], acc: [0.203125] [2020-03-09 11:08:39,167.167] train.py [line:101] INFO: loss at epoch 12 step 30: [1.5811844], acc: [0.203125] 2020-03-09 11:08:42,918-INFO: loss at epoch 12 step 35: [1.6362698], acc: [0.15625] [2020-03-09 11:08:42,918.918] train.py [line:101] INFO: loss at epoch 12 step 35: [1.6362698], acc: [0.15625] 2020-03-09 11:08:46,617-INFO: loss at epoch 12 step 40: [1.5880212], acc: [0.265625] [2020-03-09 11:08:46,617.617] train.py [line:101] INFO: loss at epoch 12 step 40: [1.5880212], acc: [0.265625] 2020-03-09 11:08:49,844-INFO: epoch 12 acc: [0.25694445] [2020-03-09 11:08:49,844.844] train.py [line:104] INFO: epoch 12 acc: [0.25694445] 2020-03-09 11:08:49,844-INFO: current epoch 12 acc: [0.25694445] better than last acc: [0.25034723], save model [2020-03-09 11:08:49,844.844] train.py [line:107] INFO: current epoch 12 acc: [0.25694445] better than last acc: [0.25034723], save model 2020-03-09 11:08:54,329-INFO: loss at epoch 13 step 5: [1.5967482], acc: [0.265625] [2020-03-09 11:08:54,329.329] train.py [line:101] INFO: loss at epoch 13 step 5: [1.5967482], acc: [0.265625] 2020-03-09 11:08:58,054-INFO: loss at epoch 13 step 10: [1.6303033], acc: [0.203125] [2020-03-09 11:08:58,054.054] train.py [line:101] INFO: loss at epoch 13 step 10: [1.6303033], acc: [0.203125] 2020-03-09 11:09:01,710-INFO: loss at epoch 13 step 15: [1.5459465], acc: [0.21875] [2020-03-09 11:09:01,710.710] train.py [line:101] INFO: loss at epoch 13 step 15: [1.5459465], acc: [0.21875] 2020-03-09 11:09:05,324-INFO: loss at epoch 13 step 20: [1.5817664], acc: [0.21875] [2020-03-09 11:09:05,324.324] train.py [line:101] INFO: loss at epoch 13 step 20: [1.5817664], acc: [0.21875] 2020-03-09 11:09:09,040-INFO: loss at epoch 13 step 25: [1.6506286], acc: [0.15625] [2020-03-09 11:09:09,040.040] train.py [line:101] INFO: loss at epoch 13 step 25: [1.6506286], acc: [0.15625] 2020-03-09 11:09:12,676-INFO: loss at epoch 13 step 30: [1.6200975], acc: [0.234375] [2020-03-09 11:09:12,676.676] train.py [line:101] INFO: loss at epoch 13 step 30: [1.6200975], acc: [0.234375] 2020-03-09 11:09:16,166-INFO: loss at epoch 13 step 35: [1.5813174], acc: [0.234375] [2020-03-09 11:09:16,166.166] train.py [line:101] INFO: loss at epoch 13 step 35: [1.5813174], acc: [0.234375] 2020-03-09 11:09:19,906-INFO: loss at epoch 13 step 40: [1.6045702], acc: [0.21875] [2020-03-09 11:09:19,906.906] train.py [line:101] INFO: loss at epoch 13 step 40: [1.6045702], acc: [0.21875] 2020-03-09 11:09:23,363-INFO: epoch 13 acc: [0.23472223] [2020-03-09 11:09:23,363.363] train.py [line:104] INFO: epoch 13 acc: [0.23472223] 2020-03-09 11:09:27,973-INFO: loss at epoch 14 step 5: [1.571803], acc: [0.21875] [2020-03-09 11:09:27,973.973] train.py [line:101] INFO: loss at epoch 14 step 5: [1.571803], acc: [0.21875] 2020-03-09 11:09:31,632-INFO: loss at epoch 14 step 10: [1.5982358], acc: [0.296875] [2020-03-09 11:09:31,632.632] train.py [line:101] INFO: loss at epoch 14 step 10: [1.5982358], acc: [0.296875] 2020-03-09 11:09:35,324-INFO: loss at epoch 14 step 15: [1.6039678], acc: [0.25] [2020-03-09 11:09:35,324.324] train.py [line:101] INFO: loss at epoch 14 step 15: [1.6039678], acc: [0.25] 2020-03-09 11:09:38,975-INFO: loss at epoch 14 step 20: [1.6135038], acc: [0.1875] [2020-03-09 11:09:38,975.975] train.py [line:101] INFO: loss at epoch 14 step 20: [1.6135038], acc: [0.1875] 2020-03-09 11:09:42,465-INFO: loss at epoch 14 step 25: [1.5789667], acc: [0.234375] [2020-03-09 11:09:42,465.465] train.py [line:101] INFO: loss at epoch 14 step 25: [1.5789667], acc: [0.234375] 2020-03-09 11:09:46,115-INFO: loss at epoch 14 step 30: [1.5895681], acc: [0.296875] [2020-03-09 11:09:46,115.115] train.py [line:101] INFO: loss at epoch 14 step 30: [1.5895681], acc: [0.296875] 2020-03-09 11:09:49,829-INFO: loss at epoch 14 step 35: [1.5904217], acc: [0.265625] [2020-03-09 11:09:49,829.829] train.py [line:101] INFO: loss at epoch 14 step 35: [1.5904217], acc: [0.265625] 2020-03-09 11:09:53,570-INFO: loss at epoch 14 step 40: [1.6426864], acc: [0.25] [2020-03-09 11:09:53,570.570] train.py [line:101] INFO: loss at epoch 14 step 40: [1.6426864], acc: [0.25] 2020-03-09 11:09:56,906-INFO: epoch 14 acc: [0.23958333] [2020-03-09 11:09:56,906.906] train.py [line:104] INFO: epoch 14 acc: [0.23958333] 2020-03-09 11:10:00,981-INFO: loss at epoch 15 step 5: [1.6389596], acc: [0.234375] [2020-03-09 11:10:00,981.981] train.py [line:101] INFO: loss at epoch 15 step 5: [1.6389596], acc: [0.234375] 2020-03-09 11:10:04,421-INFO: loss at epoch 15 step 10: [1.5629132], acc: [0.265625] [2020-03-09 11:10:04,421.421] train.py [line:101] INFO: loss at epoch 15 step 10: [1.5629132], acc: [0.265625] 2020-03-09 11:10:08,270-INFO: loss at epoch 15 step 15: [1.5482863], acc: [0.34375] [2020-03-09 11:10:08,270.270] train.py [line:101] INFO: loss at epoch 15 step 15: [1.5482863], acc: [0.34375] 2020-03-09 11:10:11,954-INFO: loss at epoch 15 step 20: [1.5862609], acc: [0.265625] [2020-03-09 11:10:11,954.954] train.py [line:101] INFO: loss at epoch 15 step 20: [1.5862609], acc: [0.265625] 2020-03-09 11:10:15,644-INFO: loss at epoch 15 step 25: [1.597038], acc: [0.296875] [2020-03-09 11:10:15,644.644] train.py [line:101] INFO: loss at epoch 15 step 25: [1.597038], acc: [0.296875] 2020-03-09 11:10:19,275-INFO: loss at epoch 15 step 30: [1.6329737], acc: [0.1875] [2020-03-09 11:10:19,275.275] train.py [line:101] INFO: loss at epoch 15 step 30: [1.6329737], acc: [0.1875] 2020-03-09 11:10:23,009-INFO: loss at epoch 15 step 35: [1.6133089], acc: [0.296875] [2020-03-09 11:10:23,009.009] train.py [line:101] INFO: loss at epoch 15 step 35: [1.6133089], acc: [0.296875] 2020-03-09 11:10:26,594-INFO: loss at epoch 15 step 40: [1.6456943], acc: [0.15625] [2020-03-09 11:10:26,594.594] train.py [line:101] INFO: loss at epoch 15 step 40: [1.6456943], acc: [0.15625] 2020-03-09 11:10:29,909-INFO: epoch 15 acc: [0.25520834] [2020-03-09 11:10:29,909.909] train.py [line:104] INFO: epoch 15 acc: [0.25520834] 2020-03-09 11:10:34,254-INFO: loss at epoch 16 step 5: [1.6248486], acc: [0.140625] [2020-03-09 11:10:34,254.254] train.py [line:101] INFO: loss at epoch 16 step 5: [1.6248486], acc: [0.140625] 2020-03-09 11:10:38,167-INFO: loss at epoch 16 step 10: [1.608763], acc: [0.140625] [2020-03-09 11:10:38,167.167] train.py [line:101] INFO: loss at epoch 16 step 10: [1.608763], acc: [0.140625] 2020-03-09 11:10:41,861-INFO: loss at epoch 16 step 15: [1.5966976], acc: [0.296875] [2020-03-09 11:10:41,861.861] train.py [line:101] INFO: loss at epoch 16 step 15: [1.5966976], acc: [0.296875] 2020-03-09 11:10:45,531-INFO: loss at epoch 16 step 20: [1.582356], acc: [0.203125] [2020-03-09 11:10:45,531.531] train.py [line:101] INFO: loss at epoch 16 step 20: [1.582356], acc: [0.203125] 2020-03-09 11:10:49,150-INFO: loss at epoch 16 step 25: [1.6145353], acc: [0.21875] [2020-03-09 11:10:49,150.150] train.py [line:101] INFO: loss at epoch 16 step 25: [1.6145353], acc: [0.21875] 2020-03-09 11:10:52,822-INFO: loss at epoch 16 step 30: [1.5803611], acc: [0.25] [2020-03-09 11:10:52,822.822] train.py [line:101] INFO: loss at epoch 16 step 30: [1.5803611], acc: [0.25] 2020-03-09 11:10:56,384-INFO: loss at epoch 16 step 35: [1.6446288], acc: [0.21875] [2020-03-09 11:10:56,384.384] train.py [line:101] INFO: loss at epoch 16 step 35: [1.6446288], acc: [0.21875] 2020-03-09 11:11:00,022-INFO: loss at epoch 16 step 40: [1.6223211], acc: [0.265625] [2020-03-09 11:11:00,022.022] train.py [line:101] INFO: loss at epoch 16 step 40: [1.6223211], acc: [0.265625] 2020-03-09 11:11:03,439-INFO: epoch 16 acc: [0.24479167] [2020-03-09 11:11:03,439.439] train.py [line:104] INFO: epoch 16 acc: [0.24479167] 2020-03-09 11:11:07,861-INFO: loss at epoch 17 step 5: [1.5905073], acc: [0.25] [2020-03-09 11:11:07,861.861] train.py [line:101] INFO: loss at epoch 17 step 5: [1.5905073], acc: [0.25] 2020-03-09 11:11:11,573-INFO: loss at epoch 17 step 10: [1.5961004], acc: [0.25] [2020-03-09 11:11:11,573.573] train.py [line:101] INFO: loss at epoch 17 step 10: [1.5961004], acc: [0.25] 2020-03-09 11:11:15,296-INFO: loss at epoch 17 step 15: [1.6661184], acc: [0.1875] [2020-03-09 11:11:15,296.296] train.py [line:101] INFO: loss at epoch 17 step 15: [1.6661184], acc: [0.1875] 2020-03-09 11:11:19,010-INFO: loss at epoch 17 step 20: [1.5499442], acc: [0.34375] [2020-03-09 11:11:19,010.010] train.py [line:101] INFO: loss at epoch 17 step 20: [1.5499442], acc: [0.34375] 2020-03-09 11:11:22,655-INFO: loss at epoch 17 step 25: [1.6106293], acc: [0.296875] [2020-03-09 11:11:22,655.655] train.py [line:101] INFO: loss at epoch 17 step 25: [1.6106293], acc: [0.296875] 2020-03-09 11:11:26,486-INFO: loss at epoch 17 step 30: [1.5402105], acc: [0.28125] [2020-03-09 11:11:26,486.486] train.py [line:101] INFO: loss at epoch 17 step 30: [1.5402105], acc: [0.28125] 2020-03-09 11:11:30,085-INFO: loss at epoch 17 step 35: [1.5527694], acc: [0.34375] [2020-03-09 11:11:30,085.085] train.py [line:101] INFO: loss at epoch 17 step 35: [1.5527694], acc: [0.34375] 2020-03-09 11:11:33,686-INFO: loss at epoch 17 step 40: [1.5802052], acc: [0.234375] [2020-03-09 11:11:33,686.686] train.py [line:101] INFO: loss at epoch 17 step 40: [1.5802052], acc: [0.234375] 2020-03-09 11:11:36,943-INFO: epoch 17 acc: [0.24895833] [2020-03-09 11:11:36,943.943] train.py [line:104] INFO: epoch 17 acc: [0.24895833] 2020-03-09 11:11:41,231-INFO: loss at epoch 18 step 5: [1.6016227], acc: [0.234375] [2020-03-09 11:11:41,231.231] train.py [line:101] INFO: loss at epoch 18 step 5: [1.6016227], acc: [0.234375] 2020-03-09 11:11:44,964-INFO: loss at epoch 18 step 10: [1.6068442], acc: [0.1875] [2020-03-09 11:11:44,964.964] train.py [line:101] INFO: loss at epoch 18 step 10: [1.6068442], acc: [0.1875] 2020-03-09 11:11:48,832-INFO: loss at epoch 18 step 15: [1.6380043], acc: [0.171875] [2020-03-09 11:11:48,832.832] train.py [line:101] INFO: loss at epoch 18 step 15: [1.6380043], acc: [0.171875] 2020-03-09 11:11:52,681-INFO: loss at epoch 18 step 20: [1.6012943], acc: [0.3125] [2020-03-09 11:11:52,681.681] train.py [line:101] INFO: loss at epoch 18 step 20: [1.6012943], acc: [0.3125] 2020-03-09 11:11:56,476-INFO: loss at epoch 18 step 25: [1.5408883], acc: [0.3125] [2020-03-09 11:11:56,476.476] train.py [line:101] INFO: loss at epoch 18 step 25: [1.5408883], acc: [0.3125] 2020-03-09 11:12:00,191-INFO: loss at epoch 18 step 30: [1.5885074], acc: [0.28125] [2020-03-09 11:12:00,191.191] train.py [line:101] INFO: loss at epoch 18 step 30: [1.5885074], acc: [0.28125] 2020-03-09 11:12:03,595-INFO: loss at epoch 18 step 35: [1.601891], acc: [0.25] [2020-03-09 11:12:03,595.595] train.py [line:101] INFO: loss at epoch 18 step 35: [1.601891], acc: [0.25] 2020-03-09 11:12:07,275-INFO: loss at epoch 18 step 40: [1.5997787], acc: [0.21875] [2020-03-09 11:12:07,275.275] train.py [line:101] INFO: loss at epoch 18 step 40: [1.5997787], acc: [0.21875] 2020-03-09 11:12:10,789-INFO: epoch 18 acc: [0.25277779] [2020-03-09 11:12:10,789.789] train.py [line:104] INFO: epoch 18 acc: [0.25277779] 2020-03-09 11:12:15,200-INFO: loss at epoch 19 step 5: [1.6109711], acc: [0.25] [2020-03-09 11:12:15,200.200] train.py [line:101] INFO: loss at epoch 19 step 5: [1.6109711], acc: [0.25] 2020-03-09 11:12:19,141-INFO: loss at epoch 19 step 10: [1.5723007], acc: [0.296875] [2020-03-09 11:12:19,141.141] train.py [line:101] INFO: loss at epoch 19 step 10: [1.5723007], acc: [0.296875] 2020-03-09 11:12:22,695-INFO: loss at epoch 19 step 15: [1.6026635], acc: [0.21875] [2020-03-09 11:12:22,695.695] train.py [line:101] INFO: loss at epoch 19 step 15: [1.6026635], acc: [0.21875] 2020-03-09 11:12:26,368-INFO: loss at epoch 19 step 20: [1.6145647], acc: [0.25] [2020-03-09 11:12:26,368.368] train.py [line:101] INFO: loss at epoch 19 step 20: [1.6145647], acc: [0.25] 2020-03-09 11:12:30,104-INFO: loss at epoch 19 step 25: [1.6088228], acc: [0.203125] [2020-03-09 11:12:30,104.104] train.py [line:101] INFO: loss at epoch 19 step 25: [1.6088228], acc: [0.203125] 2020-03-09 11:12:33,680-INFO: loss at epoch 19 step 30: [1.6366001], acc: [0.171875] [2020-03-09 11:12:33,680.680] train.py [line:101] INFO: loss at epoch 19 step 30: [1.6366001], acc: [0.171875] 2020-03-09 11:12:37,394-INFO: loss at epoch 19 step 35: [1.6551399], acc: [0.1875] [2020-03-09 11:12:37,394.394] train.py [line:101] INFO: loss at epoch 19 step 35: [1.6551399], acc: [0.1875] 2020-03-09 11:12:40,752-INFO: loss at epoch 19 step 40: [1.5874735], acc: [0.28125] [2020-03-09 11:12:40,752.752] train.py [line:101] INFO: loss at epoch 19 step 40: [1.5874735], acc: [0.28125] 2020-03-09 11:12:44,726-INFO: epoch 19 acc: [0.24791667] [2020-03-09 11:12:44,726.726] train.py [line:104] INFO: epoch 19 acc: [0.24791667] 2020-03-09 11:12:44,727-INFO: train till end [2020-03-09 11:12:44,727.727] train.py [line:114] INFO: train till end 

 

加载训练保存的模型,验证效果

In[10]

!python work/eval.py
[2020-03-09 11:12:53,244.244] config.py [line:77] INFO: input_size: [3, 224, 224] [2020-03-09 11:12:53,244.244] config.py [line:78] INFO: class_dim: 5 [2020-03-09 11:12:53,244.244] config.py [line:79] INFO: continue_train: True [2020-03-09 11:12:53,244.244] config.py [line:80] INFO: train_image_count: 2931 [2020-03-09 11:12:53,244.244] config.py [line:81] INFO: eval_image_count: 739 [2020-03-09 11:12:53,244.244] config.py [line:82] INFO: num_epochs: 20 [2020-03-09 11:12:53,244.244] config.py [line:83] INFO: train_batch_size: 64 [2020-03-09 11:12:53,244.244] config.py [line:84] INFO: mean_rgb: [127.5, 127.5, 127.5] [2020-03-09 11:12:53,244.244] config.py [line:85] INFO: save_model_dir: ./model-params/net [2020-03-09 11:12:53,245.245] eval.py [line:16] INFO: start eval W0309 11:12:54.145843 522 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 10.1, Runtime API Version: 9.0 W0309 11:12:54.150002 522 device_context.cc:245] device: 0, cuDNN Version: 7.3. [2020-03-09 11:13:04,772.772] eval.py [line:45] INFO: test count: 739 , acc: 0.24763193726539612 cost time: 9.075299978256226 

点击链接,使用AI Studio一键上手实践项目吧:https://aistudio.baidu.com/aistudio/projectdetail/169429 

下载安装命令

## CPU版本安装命令
pip install -f https://paddlepaddle.org.cn/pip/oschina/cpu paddlepaddle

## GPU版本安装命令
pip install -f https://paddlepaddle.org.cn/pip/oschina/gpu paddlepaddle-gpu

>> 访问 PaddlePaddle 官网,了解更多相关内容

{{o.name}}


{{m.name}}

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/72689.html

(0)
上一篇 2021年8月11日
下一篇 2021年8月11日

相关推荐

发表回复

登录后才能评论