代码拉取完成,页面将自动刷新
# -*- coding: utf-8 -*-
"""
author:tslgithub
email:mymailwith163@163.com
time:2018-12-12
msg: You can choose the following model to train your image, and just choose in config.py:
VGG16,VGG19,InceptionV3,Xception,MobileNet,AlexNet,LeNet,ZF_Net,
ResNet18,ResNet34,ResNet50,ResNet101,ResNet152,mnist_net,TSL16
"""
import sys
class DefaultConfig():
try:
model_name = sys.argv[1]
except:
print("use default model VGG16, see config.py")
model_name = "VGG16"
train_data_path = './dataset/train/'
test_data_path = './dataset/test/'
checkpoints = './checkpoints/'
if model_name == 'InceptionV3':
normal_size = 75#minSize
elif model_name == 'Xception':
normal_size = 71#minSize
else:
normal_size = 64
# normal_size = 48
epochs = 1
batch_size = 2
classNumber = 2 # see dataset/tri
channles = 3 # or 3 or 1
lr = 0.00001
lr_reduce_patience = 5 # 需要降低学习率的训练步长
early_stop_patience = 11 # 提前终止训练的步长
data_augmentation = False
monitor = 'val_loss'
cut = False
rat = 0.1 #if cut,img[slice(h*self.rat,h-h*self.rat),slice(w*self.rat,w-w*self.rat)]
config = DefaultConfig()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。