1 Star 0 Fork 0

wxs1129/image_class

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
config.py 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
phoneProject 提交于 2019-09-07 18:25 . update config.py
# -*- 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()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wxs1129/image_class.git
git@gitee.com:wxs1129/image_class.git
wxs1129
image_class
image_class
master

搜索帮助