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

原创
2020/04/22 13:40
阅读数 1K

项目简介

本项目基于paddle 动态图实现了图像分类模型 SE_ResNeXt,建议使用GPU来运行本项目,静态图版本请查看:用PaddlePaddle实现图像分类-SE_ResNeXt,具体介绍如下:

下载安装命令

## 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

ResNeXt:

VGG和ResNet的成功表明通过堆叠相同形状的Block的方法不仅可以减少超参数的数量,而且能取得SOTA的结果。而GoogleNet和Inception为代表的实践也表明,通过split-transform-merge策略进行精细的网络设计也能达到非常好的效果。ResNeXt的想法就是把这两种好的想法揉到一起。 ResNeXt并没有像GoogleNet系列那样进行split-transform-merge,而是如下图所示,对相同的子结构进行简单的重复,从而既做了split-transform-merge,同时也没有多少超参数量的增加。

上图中(a)结构是resnext的原始结构,(b)和(c)为(a)结构的等价表示,在实际实现中,采用实现起来相对简单的(c)结构,即通过分组卷积的形式来实现resnext的基础block。

Squeeze-and-Excitation Networks:

2017年Attention机制被提出,2018年很多的工作都是基于Attention机制进行的,SENet也可以看作是其中之一,该模块可以看作是channel-wies的Attention机制。如下图所示,SENet在常规的卷积之后增加了一条专门计算channel-wise scale的branch,然后把得到的值乘到相应的channel上。 

SE_ResNeXt:

SE_ResNeXt是将se模块应用在resnext中的residual block上得到的模型,其他结构参数配置可以了解ResNeXt网络结构。

参考链接:

[1] Res-Family: From ResNet to SE-ResNeXt
[2] Squeeze-and-Excitation Networks
[3] Aggregated Residual Transformations for Deep Neural Networks

数据介绍

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

In[1]
# 解压鲜花数据集
!cd data/data2815 && unzip -q flower_photos.zip
In[2]
# 预处理数据,将其转化为标准格式。同时将数据拆分成两份,以便训练和计算预估准确率
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[3]
# 使用鲜花数据集训练SE_ResNeXt模型,具体的配置可以在work/config.py文件中进行修改
# 目前是加载上次训练的断点进行继续训练,如果需要从零训练,可以将config.py文件中的『continue_train』参数改为Fales
!python work/train.py
2020-03-09 15:00:34,506-INFO: input_size: [3, 224, 224]
[2020-03-09 15:00:34,506.506] config.py [line:85] INFO: input_size: [3, 224, 224]
2020-03-09 15:00:34,506-INFO: class_dim: 5
[2020-03-09 15:00:34,506.506] config.py [line:86] INFO: class_dim: 5
2020-03-09 15:00:34,506-INFO: continue_train: True
[2020-03-09 15:00:34,506.506] config.py [line:87] INFO: continue_train: True
2020-03-09 15:00:34,506-INFO: train_image_count: 2932
[2020-03-09 15:00:34,506.506] config.py [line:88] INFO: train_image_count: 2932
2020-03-09 15:00:34,506-INFO: eval_image_count: 738
[2020-03-09 15:00:34,506.506] config.py [line:89] INFO: eval_image_count: 738
2020-03-09 15:00:34,506-INFO: num_epochs: 20
[2020-03-09 15:00:34,506.506] config.py [line:90] INFO: num_epochs: 20
2020-03-09 15:00:34,506-INFO: train_batch_size: 64
[2020-03-09 15:00:34,506.506] config.py [line:91] INFO: train_batch_size: 64
2020-03-09 15:00:34,506-INFO: mean_rgb: [127.5, 127.5, 127.5]
[2020-03-09 15:00:34,506.506] config.py [line:92] INFO: mean_rgb: [127.5, 127.5, 127.5]
2020-03-09 15:00:34,507-INFO: save_model_dir: ./save_dir/model
[2020-03-09 15:00:34,507.507] config.py [line:93] INFO: save_model_dir: ./save_dir/model
2020-03-09 15:00:34,508-INFO: start train
[2020-03-09 15:00:34,508.508] train.py [line:60] INFO: start train
W0309 15:00:35.266741    93 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 10.1, Runtime API Version: 9.0
W0309 15:00:35.270828    93 device_context.cc:245] device: 0, cuDNN Version: 7.3.
2020-03-09 15:00:36,857-INFO: use Adam optimizer
[2020-03-09 15:00:36,857.857] train.py [line:32] INFO: use Adam optimizer
2020-03-09 15:00:36,857-INFO: load params from ./save_dir/model
[2020-03-09 15:00:36,857.857] train.py [line:44] INFO: load params from ./save_dir/model
2020-03-09 15:00:44,443-INFO: loss at epoch 0 step 5: [1.6149678], acc: [0.25]
[2020-03-09 15:00:44,443.443] train.py [line:99] INFO: loss at epoch 0 step 5: [1.6149678], acc: [0.25]
2020-03-09 15:00:49,983-INFO: loss at epoch 0 step 10: [1.6174326], acc: [0.21875]
[2020-03-09 15:00:49,983.983] train.py [line:99] INFO: loss at epoch 0 step 10: [1.6174326], acc: [0.21875]
2020-03-09 15:00:55,425-INFO: loss at epoch 0 step 15: [1.5295928], acc: [0.328125]
[2020-03-09 15:00:55,425.425] train.py [line:99] INFO: loss at epoch 0 step 15: [1.5295928], acc: [0.328125]
2020-03-09 15:01:01,174-INFO: loss at epoch 0 step 20: [1.648237], acc: [0.25]
[2020-03-09 15:01:01,174.174] train.py [line:99] INFO: loss at epoch 0 step 20: [1.648237], acc: [0.25]
2020-03-09 15:01:06,687-INFO: loss at epoch 0 step 25: [1.5592561], acc: [0.328125]
[2020-03-09 15:01:06,687.687] train.py [line:99] INFO: loss at epoch 0 step 25: [1.5592561], acc: [0.328125]
2020-03-09 15:01:12,367-INFO: loss at epoch 0 step 30: [1.5287552], acc: [0.3125]
[2020-03-09 15:01:12,367.367] train.py [line:99] INFO: loss at epoch 0 step 30: [1.5287552], acc: [0.3125]
2020-03-09 15:01:17,978-INFO: loss at epoch 0 step 35: [1.6007165], acc: [0.234375]
[2020-03-09 15:01:17,978.978] train.py [line:99] INFO: loss at epoch 0 step 35: [1.6007165], acc: [0.234375]
2020-03-09 15:01:23,558-INFO: loss at epoch 0 step 40: [1.5394619], acc: [0.34375]
[2020-03-09 15:01:23,558.558] train.py [line:99] INFO: loss at epoch 0 step 40: [1.5394619], acc: [0.34375]
2020-03-09 15:01:28,273-INFO: epoch 0 acc: [0.29826388]
[2020-03-09 15:01:28,273.273] train.py [line:102] INFO: epoch 0 acc: [0.29826388]
2020-03-09 15:01:28,273-INFO: current epoch 0 acc: [0.29826388] better than last acc: 0.0, save model
[2020-03-09 15:01:28,273.273] train.py [line:105] INFO: current epoch 0 acc: [0.29826388] better than last acc: 0.0, save model
2020-03-09 15:01:36,387-INFO: loss at epoch 1 step 5: [1.5155416], acc: [0.34375]
[2020-03-09 15:01:36,387.387] train.py [line:99] INFO: loss at epoch 1 step 5: [1.5155416], acc: [0.34375]
2020-03-09 15:01:41,948-INFO: loss at epoch 1 step 10: [1.5642886], acc: [0.265625]
[2020-03-09 15:01:41,948.948] train.py [line:99] INFO: loss at epoch 1 step 10: [1.5642886], acc: [0.265625]
2020-03-09 15:01:47,408-INFO: loss at epoch 1 step 15: [1.5771188], acc: [0.34375]
[2020-03-09 15:01:47,408.408] train.py [line:99] INFO: loss at epoch 1 step 15: [1.5771188], acc: [0.34375]
2020-03-09 15:01:53,089-INFO: loss at epoch 1 step 20: [1.5366778], acc: [0.296875]
[2020-03-09 15:01:53,089.089] train.py [line:99] INFO: loss at epoch 1 step 20: [1.5366778], acc: [0.296875]
2020-03-09 15:01:58,756-INFO: loss at epoch 1 step 25: [1.5738761], acc: [0.28125]
[2020-03-09 15:01:58,756.756] train.py [line:99] INFO: loss at epoch 1 step 25: [1.5738761], acc: [0.28125]
2020-03-09 15:02:04,290-INFO: loss at epoch 1 step 30: [1.5744781], acc: [0.28125]
[2020-03-09 15:02:04,290.290] train.py [line:99] INFO: loss at epoch 1 step 30: [1.5744781], acc: [0.28125]
2020-03-09 15:02:10,011-INFO: loss at epoch 1 step 35: [1.5508429], acc: [0.34375]
[2020-03-09 15:02:10,011.011] train.py [line:99] INFO: loss at epoch 1 step 35: [1.5508429], acc: [0.34375]
2020-03-09 15:02:15,455-INFO: loss at epoch 1 step 40: [1.5757682], acc: [0.265625]
[2020-03-09 15:02:15,455.455] train.py [line:99] INFO: loss at epoch 1 step 40: [1.5757682], acc: [0.265625]
2020-03-09 15:02:20,174-INFO: epoch 1 acc: [0.29965279]
[2020-03-09 15:02:20,174.174] train.py [line:102] INFO: epoch 1 acc: [0.29965279]
2020-03-09 15:02:20,175-INFO: current epoch 1 acc: [0.29965279] better than last acc: [0.29826388], save model
[2020-03-09 15:02:20,175.175] train.py [line:105] INFO: current epoch 1 acc: [0.29965279] better than last acc: [0.29826388], save model
2020-03-09 15:02:27,951-INFO: loss at epoch 2 step 5: [1.5774281], acc: [0.296875]
[2020-03-09 15:02:27,951.951] train.py [line:99] INFO: loss at epoch 2 step 5: [1.5774281], acc: [0.296875]
2020-03-09 15:02:33,371-INFO: loss at epoch 2 step 10: [1.5684673], acc: [0.34375]
[2020-03-09 15:02:33,371.371] train.py [line:99] INFO: loss at epoch 2 step 10: [1.5684673], acc: [0.34375]
2020-03-09 15:02:39,041-INFO: loss at epoch 2 step 15: [1.5636501], acc: [0.328125]
[2020-03-09 15:02:39,041.041] train.py [line:99] INFO: loss at epoch 2 step 15: [1.5636501], acc: [0.328125]
2020-03-09 15:02:44,603-INFO: loss at epoch 2 step 20: [1.5418344], acc: [0.296875]
[2020-03-09 15:02:44,603.603] train.py [line:99] INFO: loss at epoch 2 step 20: [1.5418344], acc: [0.296875]
2020-03-09 15:02:50,268-INFO: loss at epoch 2 step 25: [1.5981975], acc: [0.265625]
[2020-03-09 15:02:50,268.268] train.py [line:99] INFO: loss at epoch 2 step 25: [1.5981975], acc: [0.265625]
2020-03-09 15:02:55,683-INFO: loss at epoch 2 step 30: [1.5575954], acc: [0.34375]
[2020-03-09 15:02:55,683.683] train.py [line:99] INFO: loss at epoch 2 step 30: [1.5575954], acc: [0.34375]
2020-03-09 15:03:01,251-INFO: loss at epoch 2 step 35: [1.5115829], acc: [0.296875]
[2020-03-09 15:03:01,251.251] train.py [line:99] INFO: loss at epoch 2 step 35: [1.5115829], acc: [0.296875]
2020-03-09 15:03:06,793-INFO: loss at epoch 2 step 40: [1.5912929], acc: [0.1875]
[2020-03-09 15:03:06,793.793] train.py [line:99] INFO: loss at epoch 2 step 40: [1.5912929], acc: [0.1875]
2020-03-09 15:03:11,683-INFO: epoch 2 acc: [0.29965279]
[2020-03-09 15:03:11,683.683] train.py [line:102] INFO: epoch 2 acc: [0.29965279]
2020-03-09 15:03:11,683-INFO: current epoch 2 acc: [0.29965279] better than last acc: [0.29965279], save model
[2020-03-09 15:03:11,683.683] train.py [line:105] INFO: current epoch 2 acc: [0.29965279] better than last acc: [0.29965279], save model
2020-03-09 15:03:19,636-INFO: loss at epoch 3 step 5: [1.5717566], acc: [0.234375]
[2020-03-09 15:03:19,636.636] train.py [line:99] INFO: loss at epoch 3 step 5: [1.5717566], acc: [0.234375]
2020-03-09 15:03:25,058-INFO: loss at epoch 3 step 10: [1.5934961], acc: [0.21875]
[2020-03-09 15:03:25,058.058] train.py [line:99] INFO: loss at epoch 3 step 10: [1.5934961], acc: [0.21875]
2020-03-09 15:03:30,557-INFO: loss at epoch 3 step 15: [1.5517085], acc: [0.25]
[2020-03-09 15:03:30,557.557] train.py [line:99] INFO: loss at epoch 3 step 15: [1.5517085], acc: [0.25]
2020-03-09 15:03:36,053-INFO: loss at epoch 3 step 20: [1.5258765], acc: [0.3125]
[2020-03-09 15:03:36,053.053] train.py [line:99] INFO: loss at epoch 3 step 20: [1.5258765], acc: [0.3125]
2020-03-09 15:03:41,551-INFO: loss at epoch 3 step 25: [1.5603921], acc: [0.28125]
[2020-03-09 15:03:41,551.551] train.py [line:99] INFO: loss at epoch 3 step 25: [1.5603921], acc: [0.28125]
2020-03-09 15:03:47,088-INFO: loss at epoch 3 step 30: [1.5246654], acc: [0.3125]
[2020-03-09 15:03:47,088.088] train.py [line:99] INFO: loss at epoch 3 step 30: [1.5246654], acc: [0.3125]
2020-03-09 15:03:52,765-INFO: loss at epoch 3 step 35: [1.5443747], acc: [0.3125]
[2020-03-09 15:03:52,765.765] train.py [line:99] INFO: loss at epoch 3 step 35: [1.5443747], acc: [0.3125]
2020-03-09 15:03:58,116-INFO: loss at epoch 3 step 40: [1.5737338], acc: [0.234375]
[2020-03-09 15:03:58,116.116] train.py [line:99] INFO: loss at epoch 3 step 40: [1.5737338], acc: [0.234375]
2020-03-09 15:04:02,945-INFO: epoch 3 acc: [0.31666666]
[2020-03-09 15:04:02,945.945] train.py [line:102] INFO: epoch 3 acc: [0.31666666]
2020-03-09 15:04:02,945-INFO: current epoch 3 acc: [0.31666666] better than last acc: [0.29965279], save model
[2020-03-09 15:04:02,945.945] train.py [line:105] INFO: current epoch 3 acc: [0.31666666] better than last acc: [0.29965279], save model
2020-03-09 15:04:10,873-INFO: loss at epoch 4 step 5: [1.5494835], acc: [0.328125]
[2020-03-09 15:04:10,873.873] train.py [line:99] INFO: loss at epoch 4 step 5: [1.5494835], acc: [0.328125]
2020-03-09 15:04:16,528-INFO: loss at epoch 4 step 10: [1.5773573], acc: [0.265625]
[2020-03-09 15:04:16,528.528] train.py [line:99] INFO: loss at epoch 4 step 10: [1.5773573], acc: [0.265625]
2020-03-09 15:04:22,170-INFO: loss at epoch 4 step 15: [1.5370116], acc: [0.328125]
[2020-03-09 15:04:22,170.170] train.py [line:99] INFO: loss at epoch 4 step 15: [1.5370116], acc: [0.328125]
2020-03-09 15:04:27,717-INFO: loss at epoch 4 step 20: [1.5262975], acc: [0.328125]
[2020-03-09 15:04:27,717.717] train.py [line:99] INFO: loss at epoch 4 step 20: [1.5262975], acc: [0.328125]
2020-03-09 15:04:33,127-INFO: loss at epoch 4 step 25: [1.5999646], acc: [0.25]
[2020-03-09 15:04:33,127.127] train.py [line:99] INFO: loss at epoch 4 step 25: [1.5999646], acc: [0.25]
2020-03-09 15:04:38,689-INFO: loss at epoch 4 step 30: [1.557823], acc: [0.265625]
[2020-03-09 15:04:38,689.689] train.py [line:99] INFO: loss at epoch 4 step 30: [1.557823], acc: [0.265625]
2020-03-09 15:04:44,264-INFO: loss at epoch 4 step 35: [1.6008859], acc: [0.28125]
[2020-03-09 15:04:44,264.264] train.py [line:99] INFO: loss at epoch 4 step 35: [1.6008859], acc: [0.28125]
2020-03-09 15:04:49,919-INFO: loss at epoch 4 step 40: [1.5542982], acc: [0.28125]
[2020-03-09 15:04:49,919.919] train.py [line:99] INFO: loss at epoch 4 step 40: [1.5542982], acc: [0.28125]
2020-03-09 15:04:54,932-INFO: epoch 4 acc: [0.321875]
[2020-03-09 15:04:54,932.932] train.py [line:102] INFO: epoch 4 acc: [0.321875]
2020-03-09 15:04:54,933-INFO: current epoch 4 acc: [0.321875] better than last acc: [0.31666666], save model
[2020-03-09 15:04:54,933.933] train.py [line:105] INFO: current epoch 4 acc: [0.321875] better than last acc: [0.31666666], save model
2020-03-09 15:05:02,668-INFO: loss at epoch 5 step 5: [1.5420407], acc: [0.3125]
[2020-03-09 15:05:02,668.668] train.py [line:99] INFO: loss at epoch 5 step 5: [1.5420407], acc: [0.3125]
2020-03-09 15:05:08,390-INFO: loss at epoch 5 step 10: [1.5524236], acc: [0.359375]
[2020-03-09 15:05:08,390.390] train.py [line:99] INFO: loss at epoch 5 step 10: [1.5524236], acc: [0.359375]
2020-03-09 15:05:14,121-INFO: loss at epoch 5 step 15: [1.4810412], acc: [0.40625]
[2020-03-09 15:05:14,121.121] train.py [line:99] INFO: loss at epoch 5 step 15: [1.4810412], acc: [0.40625]
2020-03-09 15:05:19,853-INFO: loss at epoch 5 step 20: [1.4722242], acc: [0.375]
[2020-03-09 15:05:19,853.853] train.py [line:99] INFO: loss at epoch 5 step 20: [1.4722242], acc: [0.375]
2020-03-09 15:05:25,185-INFO: loss at epoch 5 step 25: [1.57566], acc: [0.265625]
[2020-03-09 15:05:25,185.185] train.py [line:99] INFO: loss at epoch 5 step 25: [1.57566], acc: [0.265625]
2020-03-09 15:05:30,757-INFO: loss at epoch 5 step 30: [1.5118597], acc: [0.390625]
[2020-03-09 15:05:30,757.757] train.py [line:99] INFO: loss at epoch 5 step 30: [1.5118597], acc: [0.390625]
2020-03-09 15:05:36,255-INFO: loss at epoch 5 step 35: [1.5492868], acc: [0.28125]
[2020-03-09 15:05:36,255.255] train.py [line:99] INFO: loss at epoch 5 step 35: [1.5492868], acc: [0.28125]
2020-03-09 15:05:41,706-INFO: loss at epoch 5 step 40: [1.516241], acc: [0.296875]
[2020-03-09 15:05:41,706.706] train.py [line:99] INFO: loss at epoch 5 step 40: [1.516241], acc: [0.296875]
2020-03-09 15:05:46,669-INFO: epoch 5 acc: [0.315625]
[2020-03-09 15:05:46,669.669] train.py [line:102] INFO: epoch 5 acc: [0.315625]
2020-03-09 15:05:53,422-INFO: loss at epoch 6 step 5: [1.5529048], acc: [0.3125]
[2020-03-09 15:05:53,422.422] train.py [line:99] INFO: loss at epoch 6 step 5: [1.5529048], acc: [0.3125]
2020-03-09 15:05:59,077-INFO: loss at epoch 6 step 10: [1.5498601], acc: [0.328125]
[2020-03-09 15:05:59,077.077] train.py [line:99] INFO: loss at epoch 6 step 10: [1.5498601], acc: [0.328125]
2020-03-09 15:06:04,454-INFO: loss at epoch 6 step 15: [1.6363933], acc: [0.25]
[2020-03-09 15:06:04,454.454] train.py [line:99] INFO: loss at epoch 6 step 15: [1.6363933], acc: [0.25]
2020-03-09 15:06:09,975-INFO: loss at epoch 6 step 20: [1.5344057], acc: [0.3125]
[2020-03-09 15:06:09,975.975] train.py [line:99] INFO: loss at epoch 6 step 20: [1.5344057], acc: [0.3125]
2020-03-09 15:06:15,528-INFO: loss at epoch 6 step 25: [1.5586596], acc: [0.25]
[2020-03-09 15:06:15,528.528] train.py [line:99] INFO: loss at epoch 6 step 25: [1.5586596], acc: [0.25]
2020-03-09 15:06:21,188-INFO: loss at epoch 6 step 30: [1.5223274], acc: [0.34375]
[2020-03-09 15:06:21,188.188] train.py [line:99] INFO: loss at epoch 6 step 30: [1.5223274], acc: [0.34375]
2020-03-09 15:06:26,535-INFO: loss at epoch 6 step 35: [1.5472077], acc: [0.3125]
[2020-03-09 15:06:26,535.535] train.py [line:99] INFO: loss at epoch 6 step 35: [1.5472077], acc: [0.3125]
2020-03-09 15:06:32,277-INFO: loss at epoch 6 step 40: [1.5303644], acc: [0.359375]
[2020-03-09 15:06:32,277.277] train.py [line:99] INFO: loss at epoch 6 step 40: [1.5303644], acc: [0.359375]
2020-03-09 15:06:37,262-INFO: epoch 6 acc: [0.3204861]
[2020-03-09 15:06:37,262.262] train.py [line:102] INFO: epoch 6 acc: [0.3204861]
2020-03-09 15:06:44,148-INFO: loss at epoch 7 step 5: [1.5333812], acc: [0.296875]
[2020-03-09 15:06:44,148.148] train.py [line:99] INFO: loss at epoch 7 step 5: [1.5333812], acc: [0.296875]
2020-03-09 15:06:49,908-INFO: loss at epoch 7 step 10: [1.5350714], acc: [0.34375]
[2020-03-09 15:06:49,908.908] train.py [line:99] INFO: loss at epoch 7 step 10: [1.5350714], acc: [0.34375]
2020-03-09 15:06:55,409-INFO: loss at epoch 7 step 15: [1.5442283], acc: [0.390625]
[2020-03-09 15:06:55,409.409] train.py [line:99] INFO: loss at epoch 7 step 15: [1.5442283], acc: [0.390625]
2020-03-09 15:07:01,147-INFO: loss at epoch 7 step 20: [1.5254024], acc: [0.296875]
[2020-03-09 15:07:01,147.147] train.py [line:99] INFO: loss at epoch 7 step 20: [1.5254024], acc: [0.296875]
2020-03-09 15:07:06,647-INFO: loss at epoch 7 step 25: [1.5437216], acc: [0.25]
[2020-03-09 15:07:06,647.647] train.py [line:99] INFO: loss at epoch 7 step 25: [1.5437216], acc: [0.25]
2020-03-09 15:07:12,407-INFO: loss at epoch 7 step 30: [1.5496718], acc: [0.34375]
[2020-03-09 15:07:12,407.407] train.py [line:99] INFO: loss at epoch 7 step 30: [1.5496718], acc: [0.34375]
2020-03-09 15:07:17,938-INFO: loss at epoch 7 step 35: [1.541532], acc: [0.28125]
[2020-03-09 15:07:17,938.938] train.py [line:99] INFO: loss at epoch 7 step 35: [1.541532], acc: [0.28125]
2020-03-09 15:07:23,614-INFO: loss at epoch 7 step 40: [1.4945344], acc: [0.28125]
[2020-03-09 15:07:23,614.614] train.py [line:99] INFO: loss at epoch 7 step 40: [1.4945344], acc: [0.28125]
2020-03-09 15:07:28,696-INFO: epoch 7 acc: [0.32326388]
[2020-03-09 15:07:28,696.696] train.py [line:102] INFO: epoch 7 acc: [0.32326388]
2020-03-09 15:07:28,697-INFO: current epoch 7 acc: [0.32326388] better than last acc: [0.321875], save model
[2020-03-09 15:07:28,697.697] train.py [line:105] INFO: current epoch 7 acc: [0.32326388] better than last acc: [0.321875], save model
2020-03-09 15:07:36,595-INFO: loss at epoch 8 step 5: [1.500942], acc: [0.359375]
[2020-03-09 15:07:36,595.595] train.py [line:99] INFO: loss at epoch 8 step 5: [1.500942], acc: [0.359375]
2020-03-09 15:07:42,193-INFO: loss at epoch 8 step 10: [1.5120375], acc: [0.265625]
[2020-03-09 15:07:42,193.193] train.py [line:99] INFO: loss at epoch 8 step 10: [1.5120375], acc: [0.265625]
2020-03-09 15:07:47,658-INFO: loss at epoch 8 step 15: [1.5400779], acc: [0.296875]
[2020-03-09 15:07:47,658.658] train.py [line:99] INFO: loss at epoch 8 step 15: [1.5400779], acc: [0.296875]
2020-03-09 15:07:53,258-INFO: loss at epoch 8 step 20: [1.5080792], acc: [0.359375]
[2020-03-09 15:07:53,258.258] train.py [line:99] INFO: loss at epoch 8 step 20: [1.5080792], acc: [0.359375]
2020-03-09 15:07:58,916-INFO: loss at epoch 8 step 25: [1.4990475], acc: [0.34375]
[2020-03-09 15:07:58,916.916] train.py [line:99] INFO: loss at epoch 8 step 25: [1.4990475], acc: [0.34375]
2020-03-09 15:08:04,293-INFO: loss at epoch 8 step 30: [1.4509101], acc: [0.4375]
[2020-03-09 15:08:04,293.293] train.py [line:99] INFO: loss at epoch 8 step 30: [1.4509101], acc: [0.4375]
2020-03-09 15:08:09,954-INFO: loss at epoch 8 step 35: [1.6119635], acc: [0.25]
[2020-03-09 15:08:09,954.954] train.py [line:99] INFO: loss at epoch 8 step 35: [1.6119635], acc: [0.25]
2020-03-09 15:08:15,403-INFO: loss at epoch 8 step 40: [1.5412633], acc: [0.34375]
[2020-03-09 15:08:15,403.403] train.py [line:99] INFO: loss at epoch 8 step 40: [1.5412633], acc: [0.34375]
2020-03-09 15:08:20,443-INFO: epoch 8 acc: [0.33472222]
[2020-03-09 15:08:20,443.443] train.py [line:102] INFO: epoch 8 acc: [0.33472222]
2020-03-09 15:08:20,444-INFO: current epoch 8 acc: [0.33472222] better than last acc: [0.32326388], save model
[2020-03-09 15:08:20,444.444] train.py [line:105] INFO: current epoch 8 acc: [0.33472222] better than last acc: [0.32326388], save model
2020-03-09 15:08:28,344-INFO: loss at epoch 9 step 5: [1.5748457], acc: [0.25]
[2020-03-09 15:08:28,344.344] train.py [line:99] INFO: loss at epoch 9 step 5: [1.5748457], acc: [0.25]
2020-03-09 15:08:34,017-INFO: loss at epoch 9 step 10: [1.5690806], acc: [0.21875]
[2020-03-09 15:08:34,017.017] train.py [line:99] INFO: loss at epoch 9 step 10: [1.5690806], acc: [0.21875]
2020-03-09 15:08:39,445-INFO: loss at epoch 9 step 15: [1.5523152], acc: [0.359375]
[2020-03-09 15:08:39,445.445] train.py [line:99] INFO: loss at epoch 9 step 15: [1.5523152], acc: [0.359375]
2020-03-09 15:08:44,995-INFO: loss at epoch 9 step 20: [1.4939171], acc: [0.34375]
[2020-03-09 15:08:44,995.995] train.py [line:99] INFO: loss at epoch 9 step 20: [1.4939171], acc: [0.34375]
2020-03-09 15:08:50,841-INFO: loss at epoch 9 step 25: [1.5503641], acc: [0.28125]
[2020-03-09 15:08:50,841.841] train.py [line:99] INFO: loss at epoch 9 step 25: [1.5503641], acc: [0.28125]
2020-03-09 15:08:56,756-INFO: loss at epoch 9 step 30: [1.5980228], acc: [0.34375]
[2020-03-09 15:08:56,756.756] train.py [line:99] INFO: loss at epoch 9 step 30: [1.5980228], acc: [0.34375]
2020-03-09 15:09:02,343-INFO: loss at epoch 9 step 35: [1.5072227], acc: [0.28125]
[2020-03-09 15:09:02,343.343] train.py [line:99] INFO: loss at epoch 9 step 35: [1.5072227], acc: [0.28125]
2020-03-09 15:09:08,003-INFO: loss at epoch 9 step 40: [1.5305991], acc: [0.328125]
[2020-03-09 15:09:08,003.003] train.py [line:99] INFO: loss at epoch 9 step 40: [1.5305991], acc: [0.328125]
2020-03-09 15:09:13,081-INFO: epoch 9 acc: [0.33125]
[2020-03-09 15:09:13,081.081] train.py [line:102] INFO: epoch 9 acc: [0.33125]
2020-03-09 15:09:19,622-INFO: loss at epoch 10 step 5: [1.4878707], acc: [0.453125]
[2020-03-09 15:09:19,622.622] train.py [line:99] INFO: loss at epoch 10 step 5: [1.4878707], acc: [0.453125]
2020-03-09 15:09:25,272-INFO: loss at epoch 10 step 10: [1.515431], acc: [0.328125]
[2020-03-09 15:09:25,272.272] train.py [line:99] INFO: loss at epoch 10 step 10: [1.515431], acc: [0.328125]
2020-03-09 15:09:30,909-INFO: loss at epoch 10 step 15: [1.5562403], acc: [0.34375]
[2020-03-09 15:09:30,909.909] train.py [line:99] INFO: loss at epoch 10 step 15: [1.5562403], acc: [0.34375]
2020-03-09 15:09:36,563-INFO: loss at epoch 10 step 20: [1.5299196], acc: [0.359375]
[2020-03-09 15:09:36,563.563] train.py [line:99] INFO: loss at epoch 10 step 20: [1.5299196], acc: [0.359375]
2020-03-09 15:09:42,316-INFO: loss at epoch 10 step 25: [1.5720658], acc: [0.234375]
[2020-03-09 15:09:42,316.316] train.py [line:99] INFO: loss at epoch 10 step 25: [1.5720658], acc: [0.234375]
2020-03-09 15:09:48,074-INFO: loss at epoch 10 step 30: [1.5709251], acc: [0.3125]
[2020-03-09 15:09:48,074.074] train.py [line:99] INFO: loss at epoch 10 step 30: [1.5709251], acc: [0.3125]
2020-03-09 15:09:53,705-INFO: loss at epoch 10 step 35: [1.4961689], acc: [0.328125]
[2020-03-09 15:09:53,705.705] train.py [line:99] INFO: loss at epoch 10 step 35: [1.4961689], acc: [0.328125]
2020-03-09 15:09:59,291-INFO: loss at epoch 10 step 40: [1.438998], acc: [0.421875]
[2020-03-09 15:09:59,291.291] train.py [line:99] INFO: loss at epoch 10 step 40: [1.438998], acc: [0.421875]
2020-03-09 15:10:04,285-INFO: epoch 10 acc: [0.33715278]
[2020-03-09 15:10:04,285.285] train.py [line:102] INFO: epoch 10 acc: [0.33715278]
2020-03-09 15:10:04,286-INFO: current epoch 10 acc: [0.33715278] better than last acc: [0.33472222], save model
[2020-03-09 15:10:04,286.286] train.py [line:105] INFO: current epoch 10 acc: [0.33715278] better than last acc: [0.33472222], save model
2020-03-09 15:10:12,504-INFO: loss at epoch 11 step 5: [1.5302315], acc: [0.265625]
[2020-03-09 15:10:12,504.504] train.py [line:99] INFO: loss at epoch 11 step 5: [1.5302315], acc: [0.265625]
2020-03-09 15:10:18,241-INFO: loss at epoch 11 step 10: [1.4347632], acc: [0.453125]
[2020-03-09 15:10:18,241.241] train.py [line:99] INFO: loss at epoch 11 step 10: [1.4347632], acc: [0.453125]
2020-03-09 15:10:23,741-INFO: loss at epoch 11 step 15: [1.5226631], acc: [0.375]
[2020-03-09 15:10:23,741.741] train.py [line:99] INFO: loss at epoch 11 step 15: [1.5226631], acc: [0.375]
2020-03-09 15:10:29,485-INFO: loss at epoch 11 step 20: [1.4828563], acc: [0.328125]
[2020-03-09 15:10:29,485.485] train.py [line:99] INFO: loss at epoch 11 step 20: [1.4828563], acc: [0.328125]
2020-03-09 15:10:35,283-INFO: loss at epoch 11 step 25: [1.5277215], acc: [0.328125]
[2020-03-09 15:10:35,283.283] train.py [line:99] INFO: loss at epoch 11 step 25: [1.5277215], acc: [0.328125]
2020-03-09 15:10:40,873-INFO: loss at epoch 11 step 30: [1.5637448], acc: [0.359375]
[2020-03-09 15:10:40,873.873] train.py [line:99] INFO: loss at epoch 11 step 30: [1.5637448], acc: [0.359375]
2020-03-09 15:10:46,660-INFO: loss at epoch 11 step 35: [1.5778575], acc: [0.28125]
[2020-03-09 15:10:46,660.660] train.py [line:99] INFO: loss at epoch 11 step 35: [1.5778575], acc: [0.28125]
2020-03-09 15:10:52,259-INFO: loss at epoch 11 step 40: [1.5336338], acc: [0.265625]
[2020-03-09 15:10:52,259.259] train.py [line:99] INFO: loss at epoch 11 step 40: [1.5336338], acc: [0.265625]
2020-03-09 15:10:57,237-INFO: epoch 11 acc: [0.3375]
[2020-03-09 15:10:57,237.237] train.py [line:102] INFO: epoch 11 acc: [0.3375]
2020-03-09 15:10:57,237-INFO: current epoch 11 acc: [0.3375] better than last acc: [0.33715278], save model
[2020-03-09 15:10:57,237.237] train.py [line:105] INFO: current epoch 11 acc: [0.3375] better than last acc: [0.33715278], save model
2020-03-09 15:11:05,153-INFO: loss at epoch 12 step 5: [1.5146301], acc: [0.375]
[2020-03-09 15:11:05,153.153] train.py [line:99] INFO: loss at epoch 12 step 5: [1.5146301], acc: [0.375]
2020-03-09 15:11:10,846-INFO: loss at epoch 12 step 10: [1.4549727], acc: [0.453125]
[2020-03-09 15:11:10,846.846] train.py [line:99] INFO: loss at epoch 12 step 10: [1.4549727], acc: [0.453125]
2020-03-09 15:11:16,682-INFO: loss at epoch 12 step 15: [1.5604788], acc: [0.265625]
[2020-03-09 15:11:16,682.682] train.py [line:99] INFO: loss at epoch 12 step 15: [1.5604788], acc: [0.265625]
2020-03-09 15:11:22,354-INFO: loss at epoch 12 step 20: [1.5111904], acc: [0.25]
[2020-03-09 15:11:22,354.354] train.py [line:99] INFO: loss at epoch 12 step 20: [1.5111904], acc: [0.25]
2020-03-09 15:11:27,877-INFO: loss at epoch 12 step 25: [1.6508], acc: [0.359375]
[2020-03-09 15:11:27,877.877] train.py [line:99] INFO: loss at epoch 12 step 25: [1.6508], acc: [0.359375]
2020-03-09 15:11:34,084-INFO: loss at epoch 12 step 30: [1.5752741], acc: [0.3125]
[2020-03-09 15:11:34,084.084] train.py [line:99] INFO: loss at epoch 12 step 30: [1.5752741], acc: [0.3125]
2020-03-09 15:11:40,328-INFO: loss at epoch 12 step 35: [1.4902092], acc: [0.390625]
[2020-03-09 15:11:40,328.328] train.py [line:99] INFO: loss at epoch 12 step 35: [1.4902092], acc: [0.390625]
2020-03-09 15:11:45,925-INFO: loss at epoch 12 step 40: [1.5973113], acc: [0.234375]
[2020-03-09 15:11:45,925.925] train.py [line:99] INFO: loss at epoch 12 step 40: [1.5973113], acc: [0.234375]
2020-03-09 15:11:50,926-INFO: epoch 12 acc: [0.34583333]
[2020-03-09 15:11:50,926.926] train.py [line:102] INFO: epoch 12 acc: [0.34583333]
2020-03-09 15:11:50,926-INFO: current epoch 12 acc: [0.34583333] better than last acc: [0.3375], save model
[2020-03-09 15:11:50,926.926] train.py [line:105] INFO: current epoch 12 acc: [0.34583333] better than last acc: [0.3375], save model
2020-03-09 15:11:58,807-INFO: loss at epoch 13 step 5: [1.4318302], acc: [0.40625]
[2020-03-09 15:11:58,807.807] train.py [line:99] INFO: loss at epoch 13 step 5: [1.4318302], acc: [0.40625]
2020-03-09 15:12:04,433-INFO: loss at epoch 13 step 10: [1.5633497], acc: [0.359375]
[2020-03-09 15:12:04,433.433] train.py [line:99] INFO: loss at epoch 13 step 10: [1.5633497], acc: [0.359375]
2020-03-09 15:12:10,108-INFO: loss at epoch 13 step 15: [1.5251967], acc: [0.296875]
[2020-03-09 15:12:10,108.108] train.py [line:99] INFO: loss at epoch 13 step 15: [1.5251967], acc: [0.296875]
2020-03-09 15:12:15,741-INFO: loss at epoch 13 step 20: [1.4795264], acc: [0.375]
[2020-03-09 15:12:15,741.741] train.py [line:99] INFO: loss at epoch 13 step 20: [1.4795264], acc: [0.375]
2020-03-09 15:12:21,390-INFO: loss at epoch 13 step 25: [1.5746799], acc: [0.1875]
[2020-03-09 15:12:21,390.390] train.py [line:99] INFO: loss at epoch 13 step 25: [1.5746799], acc: [0.1875]
2020-03-09 15:12:27,084-INFO: loss at epoch 13 step 30: [1.49387], acc: [0.40625]
[2020-03-09 15:12:27,084.084] train.py [line:99] INFO: loss at epoch 13 step 30: [1.49387], acc: [0.40625]
2020-03-09 15:12:32,735-INFO: loss at epoch 13 step 35: [1.520997], acc: [0.40625]
[2020-03-09 15:12:32,735.735] train.py [line:99] INFO: loss at epoch 13 step 35: [1.520997], acc: [0.40625]
2020-03-09 15:12:38,245-INFO: loss at epoch 13 step 40: [1.5345097], acc: [0.296875]
[2020-03-09 15:12:38,245.245] train.py [line:99] INFO: loss at epoch 13 step 40: [1.5345097], acc: [0.296875]
2020-03-09 15:12:43,296-INFO: epoch 13 acc: [0.34513888]
[2020-03-09 15:12:43,296.296] train.py [line:102] INFO: epoch 13 acc: [0.34513888]
2020-03-09 15:12:50,040-INFO: loss at epoch 14 step 5: [1.5515063], acc: [0.28125]
[2020-03-09 15:12:50,040.040] train.py [line:99] INFO: loss at epoch 14 step 5: [1.5515063], acc: [0.28125]
2020-03-09 15:12:55,612-INFO: loss at epoch 14 step 10: [1.5120711], acc: [0.375]
[2020-03-09 15:12:55,612.612] train.py [line:99] INFO: loss at epoch 14 step 10: [1.5120711], acc: [0.375]
2020-03-09 15:13:01,108-INFO: loss at epoch 14 step 15: [1.5774219], acc: [0.28125]
[2020-03-09 15:13:01,108.108] train.py [line:99] INFO: loss at epoch 14 step 15: [1.5774219], acc: [0.28125]
2020-03-09 15:13:06,789-INFO: loss at epoch 14 step 20: [1.526446], acc: [0.34375]
[2020-03-09 15:13:06,789.789] train.py [line:99] INFO: loss at epoch 14 step 20: [1.526446], acc: [0.34375]
2020-03-09 15:13:12,450-INFO: loss at epoch 14 step 25: [1.5162569], acc: [0.28125]
[2020-03-09 15:13:12,450.450] train.py [line:99] INFO: loss at epoch 14 step 25: [1.5162569], acc: [0.28125]
2020-03-09 15:13:18,099-INFO: loss at epoch 14 step 30: [1.4928836], acc: [0.421875]
[2020-03-09 15:13:18,099.099] train.py [line:99] INFO: loss at epoch 14 step 30: [1.4928836], acc: [0.421875]
2020-03-09 15:13:23,541-INFO: loss at epoch 14 step 35: [1.4523436], acc: [0.4375]
[2020-03-09 15:13:23,541.541] train.py [line:99] INFO: loss at epoch 14 step 35: [1.4523436], acc: [0.4375]
2020-03-09 15:13:29,115-INFO: loss at epoch 14 step 40: [1.4798441], acc: [0.484375]
[2020-03-09 15:13:29,115.115] train.py [line:99] INFO: loss at epoch 14 step 40: [1.4798441], acc: [0.484375]
2020-03-09 15:13:34,062-INFO: epoch 14 acc: [0.35694444]
[2020-03-09 15:13:34,062.062] train.py [line:102] INFO: epoch 14 acc: [0.35694444]
2020-03-09 15:13:34,062-INFO: current epoch 14 acc: [0.35694444] better than last acc: [0.34583333], save model
[2020-03-09 15:13:34,062.062] train.py [line:105] INFO: current epoch 14 acc: [0.35694444] better than last acc: [0.34583333], save model
2020-03-09 15:13:42,025-INFO: loss at epoch 15 step 5: [1.56377], acc: [0.3125]
[2020-03-09 15:13:42,025.025] train.py [line:99] INFO: loss at epoch 15 step 5: [1.56377], acc: [0.3125]
2020-03-09 15:13:47,640-INFO: loss at epoch 15 step 10: [1.4861836], acc: [0.328125]
[2020-03-09 15:13:47,640.640] train.py [line:99] INFO: loss at epoch 15 step 10: [1.4861836], acc: [0.328125]
2020-03-09 15:13:53,122-INFO: loss at epoch 15 step 15: [1.5572969], acc: [0.3125]
[2020-03-09 15:13:53,122.122] train.py [line:99] INFO: loss at epoch 15 step 15: [1.5572969], acc: [0.3125]
2020-03-09 15:13:58,788-INFO: loss at epoch 15 step 20: [1.4756455], acc: [0.40625]
[2020-03-09 15:13:58,788.788] train.py [line:99] INFO: loss at epoch 15 step 20: [1.4756455], acc: [0.40625]
2020-03-09 15:14:04,295-INFO: loss at epoch 15 step 25: [1.4841217], acc: [0.328125]
[2020-03-09 15:14:04,295.295] train.py [line:99] INFO: loss at epoch 15 step 25: [1.4841217], acc: [0.328125]
2020-03-09 15:14:10,126-INFO: loss at epoch 15 step 30: [1.5470921], acc: [0.359375]
[2020-03-09 15:14:10,126.126] train.py [line:99] INFO: loss at epoch 15 step 30: [1.5470921], acc: [0.359375]
2020-03-09 15:14:15,717-INFO: loss at epoch 15 step 35: [1.4947643], acc: [0.453125]
[2020-03-09 15:14:15,717.717] train.py [line:99] INFO: loss at epoch 15 step 35: [1.4947643], acc: [0.453125]
2020-03-09 15:14:21,523-INFO: loss at epoch 15 step 40: [1.5084552], acc: [0.328125]
[2020-03-09 15:14:21,523.523] train.py [line:99] INFO: loss at epoch 15 step 40: [1.5084552], acc: [0.328125]
2020-03-09 15:14:26,237-INFO: epoch 15 acc: [0.37083334]
[2020-03-09 15:14:26,237.237] train.py [line:102] INFO: epoch 15 acc: [0.37083334]
2020-03-09 15:14:26,238-INFO: current epoch 15 acc: [0.37083334] better than last acc: [0.35694444], save model
[2020-03-09 15:14:26,238.238] train.py [line:105] INFO: current epoch 15 acc: [0.37083334] better than last acc: [0.35694444], save model
2020-03-09 15:14:34,211-INFO: loss at epoch 16 step 5: [1.4916457], acc: [0.390625]
[2020-03-09 15:14:34,211.211] train.py [line:99] INFO: loss at epoch 16 step 5: [1.4916457], acc: [0.390625]
2020-03-09 15:14:40,137-INFO: loss at epoch 16 step 10: [1.4682505], acc: [0.359375]
[2020-03-09 15:14:40,137.137] train.py [line:99] INFO: loss at epoch 16 step 10: [1.4682505], acc: [0.359375]
2020-03-09 15:14:45,637-INFO: loss at epoch 16 step 15: [1.523451], acc: [0.265625]
[2020-03-09 15:14:45,637.637] train.py [line:99] INFO: loss at epoch 16 step 15: [1.523451], acc: [0.265625]
2020-03-09 15:14:51,166-INFO: loss at epoch 16 step 20: [1.4238696], acc: [0.484375]
[2020-03-09 15:14:51,166.166] train.py [line:99] INFO: loss at epoch 16 step 20: [1.4238696], acc: [0.484375]
2020-03-09 15:14:56,910-INFO: loss at epoch 16 step 25: [1.4538344], acc: [0.421875]
[2020-03-09 15:14:56,910.910] train.py [line:99] INFO: loss at epoch 16 step 25: [1.4538344], acc: [0.421875]
2020-03-09 15:15:02,565-INFO: loss at epoch 16 step 30: [1.4314349], acc: [0.40625]
[2020-03-09 15:15:02,565.565] train.py [line:99] INFO: loss at epoch 16 step 30: [1.4314349], acc: [0.40625]
2020-03-09 15:15:08,065-INFO: loss at epoch 16 step 35: [1.4890524], acc: [0.40625]
[2020-03-09 15:15:08,065.065] train.py [line:99] INFO: loss at epoch 16 step 35: [1.4890524], acc: [0.40625]
2020-03-09 15:15:13,583-INFO: loss at epoch 16 step 40: [1.4708662], acc: [0.375]
[2020-03-09 15:15:13,583.583] train.py [line:99] INFO: loss at epoch 16 step 40: [1.4708662], acc: [0.375]
2020-03-09 15:15:18,557-INFO: epoch 16 acc: [0.35416666]
[2020-03-09 15:15:18,557.557] train.py [line:102] INFO: epoch 16 acc: [0.35416666]
2020-03-09 15:15:25,297-INFO: loss at epoch 17 step 5: [1.4718031], acc: [0.4375]
[2020-03-09 15:15:25,297.297] train.py [line:99] INFO: loss at epoch 17 step 5: [1.4718031], acc: [0.4375]
2020-03-09 15:15:30,839-INFO: loss at epoch 17 step 10: [1.4677179], acc: [0.40625]
[2020-03-09 15:15:30,839.839] train.py [line:99] INFO: loss at epoch 17 step 10: [1.4677179], acc: [0.40625]
2020-03-09 15:15:36,437-INFO: loss at epoch 17 step 15: [1.3845373], acc: [0.515625]
[2020-03-09 15:15:36,437.437] train.py [line:99] INFO: loss at epoch 17 step 15: [1.3845373], acc: [0.515625]
2020-03-09 15:15:42,211-INFO: loss at epoch 17 step 20: [1.4570693], acc: [0.484375]
[2020-03-09 15:15:42,211.211] train.py [line:99] INFO: loss at epoch 17 step 20: [1.4570693], acc: [0.484375]
2020-03-09 15:15:47,755-INFO: loss at epoch 17 step 25: [1.5152376], acc: [0.34375]
[2020-03-09 15:15:47,755.755] train.py [line:99] INFO: loss at epoch 17 step 25: [1.5152376], acc: [0.34375]
2020-03-09 15:15:53,131-INFO: loss at epoch 17 step 30: [1.5656285], acc: [0.3125]
[2020-03-09 15:15:53,131.131] train.py [line:99] INFO: loss at epoch 17 step 30: [1.5656285], acc: [0.3125]
2020-03-09 15:15:58,742-INFO: loss at epoch 17 step 35: [1.525938], acc: [0.328125]
[2020-03-09 15:15:58,742.742] train.py [line:99] INFO: loss at epoch 17 step 35: [1.525938], acc: [0.328125]
2020-03-09 15:16:04,304-INFO: loss at epoch 17 step 40: [1.4982532], acc: [0.328125]
[2020-03-09 15:16:04,304.304] train.py [line:99] INFO: loss at epoch 17 step 40: [1.4982532], acc: [0.328125]
2020-03-09 15:16:09,397-INFO: epoch 17 acc: [0.3767361]
[2020-03-09 15:16:09,397.397] train.py [line:102] INFO: epoch 17 acc: [0.3767361]
2020-03-09 15:16:09,397-INFO: current epoch 17 acc: [0.3767361] better than last acc: [0.37083334], save model
[2020-03-09 15:16:09,397.397] train.py [line:105] INFO: current epoch 17 acc: [0.3767361] better than last acc: [0.37083334], save model
2020-03-09 15:16:17,203-INFO: loss at epoch 18 step 5: [1.5633248], acc: [0.25]
[2020-03-09 15:16:17,203.203] train.py [line:99] INFO: loss at epoch 18 step 5: [1.5633248], acc: [0.25]
2020-03-09 15:16:22,687-INFO: loss at epoch 18 step 10: [1.4766004], acc: [0.390625]
[2020-03-09 15:16:22,687.687] train.py [line:99] INFO: loss at epoch 18 step 10: [1.4766004], acc: [0.390625]
2020-03-09 15:16:28,049-INFO: loss at epoch 18 step 15: [1.5209783], acc: [0.359375]
[2020-03-09 15:16:28,049.049] train.py [line:99] INFO: loss at epoch 18 step 15: [1.5209783], acc: [0.359375]
2020-03-09 15:16:33,757-INFO: loss at epoch 18 step 20: [1.4478798], acc: [0.4375]
[2020-03-09 15:16:33,757.757] train.py [line:99] INFO: loss at epoch 18 step 20: [1.4478798], acc: [0.4375]
2020-03-09 15:16:39,383-INFO: loss at epoch 18 step 25: [1.4943364], acc: [0.296875]
[2020-03-09 15:16:39,383.383] train.py [line:99] INFO: loss at epoch 18 step 25: [1.4943364], acc: [0.296875]
2020-03-09 15:16:44,933-INFO: loss at epoch 18 step 30: [1.4175651], acc: [0.375]
[2020-03-09 15:16:44,933.933] train.py [line:99] INFO: loss at epoch 18 step 30: [1.4175651], acc: [0.375]
2020-03-09 15:16:50,674-INFO: loss at epoch 18 step 35: [1.5709966], acc: [0.3125]
[2020-03-09 15:16:50,674.674] train.py [line:99] INFO: loss at epoch 18 step 35: [1.5709966], acc: [0.3125]
2020-03-09 15:16:56,333-INFO: loss at epoch 18 step 40: [1.5293647], acc: [0.328125]
[2020-03-09 15:16:56,333.333] train.py [line:99] INFO: loss at epoch 18 step 40: [1.5293647], acc: [0.328125]
2020-03-09 15:17:01,367-INFO: epoch 18 acc: [0.37534723]
[2020-03-09 15:17:01,367.367] train.py [line:102] INFO: epoch 18 acc: [0.37534723]
2020-03-09 15:17:07,898-INFO: loss at epoch 19 step 5: [1.3948063], acc: [0.421875]
[2020-03-09 15:17:07,898.898] train.py [line:99] INFO: loss at epoch 19 step 5: [1.3948063], acc: [0.421875]
2020-03-09 15:17:13,576-INFO: loss at epoch 19 step 10: [1.5533868], acc: [0.3125]
[2020-03-09 15:17:13,576.576] train.py [line:99] INFO: loss at epoch 19 step 10: [1.5533868], acc: [0.3125]
2020-03-09 15:17:19,159-INFO: loss at epoch 19 step 15: [1.5862314], acc: [0.359375]
[2020-03-09 15:17:19,159.159] train.py [line:99] INFO: loss at epoch 19 step 15: [1.5862314], acc: [0.359375]
2020-03-09 15:17:24,611-INFO: loss at epoch 19 step 20: [1.501519], acc: [0.34375]
[2020-03-09 15:17:24,611.611] train.py [line:99] INFO: loss at epoch 19 step 20: [1.501519], acc: [0.34375]
2020-03-09 15:17:30,255-INFO: loss at epoch 19 step 25: [1.465122], acc: [0.40625]
[2020-03-09 15:17:30,255.255] train.py [line:99] INFO: loss at epoch 19 step 25: [1.465122], acc: [0.40625]
2020-03-09 15:17:35,733-INFO: loss at epoch 19 step 30: [1.384291], acc: [0.53125]
[2020-03-09 15:17:35,733.733] train.py [line:99] INFO: loss at epoch 19 step 30: [1.384291], acc: [0.53125]
2020-03-09 15:17:41,223-INFO: loss at epoch 19 step 35: [1.5617728], acc: [0.296875]
[2020-03-09 15:17:41,223.223] train.py [line:99] INFO: loss at epoch 19 step 35: [1.5617728], acc: [0.296875]
2020-03-09 15:17:46,868-INFO: loss at epoch 19 step 40: [1.4974566], acc: [0.390625]
[2020-03-09 15:17:46,868.868] train.py [line:99] INFO: loss at epoch 19 step 40: [1.4974566], acc: [0.390625]
2020-03-09 15:17:51,869-INFO: epoch 19 acc: [0.378125]
[2020-03-09 15:17:51,869.869] train.py [line:102] INFO: epoch 19 acc: [0.378125]
2020-03-09 15:17:51,869-INFO: current epoch 19 acc: [0.378125] better than last acc: [0.3767361], save model
[2020-03-09 15:17:51,869.869] train.py [line:105] INFO: current epoch 19 acc: [0.378125] better than last acc: [0.3767361], save model
2020-03-09 15:17:53,013-INFO: train till end
[2020-03-09 15:17:53,013.013] train.py [line:110] INFO: train till end
In[6]
# 使用验证集对训练好的模型效果进行验证,并输出在整个验证集上的准确率
!python work/eval.py
[2020-03-09 15:22:24,507.507] config.py [line:85] INFO: input_size: [3, 224, 224]
[2020-03-09 15:22:24,507.507] config.py [line:86] INFO: class_dim: 5
[2020-03-09 15:22:24,507.507] config.py [line:87] INFO: continue_train: True
[2020-03-09 15:22:24,507.507] config.py [line:88] INFO: train_image_count: 2932
[2020-03-09 15:22:24,507.507] config.py [line:89] INFO: eval_image_count: 738
[2020-03-09 15:22:24,507.507] config.py [line:90] INFO: num_epochs: 20
[2020-03-09 15:22:24,507.507] config.py [line:91] INFO: train_batch_size: 64
[2020-03-09 15:22:24,507.507] config.py [line:92] INFO: mean_rgb: [127.5, 127.5, 127.5]
[2020-03-09 15:22:24,507.507] config.py [line:93] INFO: save_model_dir: ./save_dir/model
[2020-03-09 15:22:24,508.508] eval.py [line:16] INFO: start eval
W0309 15:22:25.993541   282 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 10.1, Runtime API Version: 9.0
W0309 15:22:25.997491   282 device_context.cc:245] device: 0, cuDNN Version: 7.3.
[2020-03-09 15:22:50,914.914] eval.py [line:45] INFO: test count: 738 , acc: 0.42547425627708435 cost time: 23.278857231140137
In[7]
!python work/infer.py
2020-03-09 15:22:56,512-INFO: input_size: [3, 224, 224]
[2020-03-09 15:22:56,512.512] config.py [line:85] INFO: input_size: [3, 224, 224]
2020-03-09 15:22:56,512-INFO: class_dim: 5
[2020-03-09 15:22:56,512.512] config.py [line:86] INFO: class_dim: 5
2020-03-09 15:22:56,512-INFO: continue_train: True
[2020-03-09 15:22:56,512.512] config.py [line:87] INFO: continue_train: True
2020-03-09 15:22:56,512-INFO: train_image_count: 2932
[2020-03-09 15:22:56,512.512] config.py [line:88] INFO: train_image_count: 2932
2020-03-09 15:22:56,513-INFO: eval_image_count: 738
[2020-03-09 15:22:56,513.513] config.py [line:89] INFO: eval_image_count: 738
2020-03-09 15:22:56,513-INFO: num_epochs: 20
[2020-03-09 15:22:56,513.513] config.py [line:90] INFO: num_epochs: 20
2020-03-09 15:22:56,513-INFO: train_batch_size: 64
[2020-03-09 15:22:56,513.513] config.py [line:91] INFO: train_batch_size: 64
2020-03-09 15:22:56,513-INFO: mean_rgb: [127.5, 127.5, 127.5]
[2020-03-09 15:22:56,513.513] config.py [line:92] INFO: mean_rgb: [127.5, 127.5, 127.5]
2020-03-09 15:22:56,513-INFO: save_model_dir: ./save_dir/model
[2020-03-09 15:22:56,513.513] config.py [line:93] INFO: save_model_dir: ./save_dir/model
2020-03-09 15:22:56,525-INFO: input_size: [3, 224, 224]
[2020-03-09 15:22:56,525.525] config.py [line:85] INFO: input_size: [3, 224, 224]
2020-03-09 15:22:56,526-INFO: class_dim: 5
[2020-03-09 15:22:56,526.526] config.py [line:86] INFO: class_dim: 5
2020-03-09 15:22:56,526-INFO: continue_train: True
[2020-03-09 15:22:56,526.526] config.py [line:87] INFO: continue_train: True
2020-03-09 15:22:56,526-INFO: train_image_count: 2932
[2020-03-09 15:22:56,526.526] config.py [line:88] INFO: train_image_count: 2932
2020-03-09 15:22:56,526-INFO: eval_image_count: 738
[2020-03-09 15:22:56,526.526] config.py [line:89] INFO: eval_image_count: 738
2020-03-09 15:22:56,526-INFO: num_epochs: 20
[2020-03-09 15:22:56,526.526] config.py [line:90] INFO: num_epochs: 20
2020-03-09 15:22:56,526-INFO: train_batch_size: 64
[2020-03-09 15:22:56,526.526] config.py [line:91] INFO: train_batch_size: 64
2020-03-09 15:22:56,526-INFO: mean_rgb: [127.5, 127.5, 127.5]
[2020-03-09 15:22:56,526.526] config.py [line:92] INFO: mean_rgb: [127.5, 127.5, 127.5]
2020-03-09 15:22:56,526-INFO: save_model_dir: ./save_dir/model
[2020-03-09 15:22:56,526.526] config.py [line:93] INFO: save_model_dir: ./save_dir/model
W0309 15:22:58.016917   342 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 10.1, Runtime API Version: 9.0
W0309 15:22:58.021023   342 device_context.cc:245] device: 0, cuDNN Version: 7.3.
checkpoint loaded
image data/data2815/sunflowers/14646283472_50a3ae1395.jpg Infer result is: dandelion

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

下载安装命令

## 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 官网,了解更多相关内容

展开阅读全文
打赏
0
0 收藏
分享
加载中
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部