47 lines
895 B
Python
47 lines
895 B
Python
mode = "benchmark"
|
|
|
|
"""
|
|
epoch 训练多少轮
|
|
lr 学习率
|
|
batch_size 一轮跑多少张图片
|
|
input_size 训练图片输入尺寸
|
|
label_name 分类
|
|
"""
|
|
|
|
if mode == "toy":
|
|
epoch = 100
|
|
lr = 5e-4
|
|
batch_size = 8
|
|
input_size = 224
|
|
|
|
# 分类
|
|
label_name = [
|
|
"american_shorthair",
|
|
"bengal",
|
|
"british_shorthair",
|
|
"exotic_shorthair",
|
|
"maine_coon",
|
|
"ragdoll",
|
|
"sphynx",
|
|
]
|
|
num_classes = len(label_name)
|
|
elif mode == "benchmark":
|
|
epoch = 50
|
|
lr = 1e-4
|
|
batch_size = 8
|
|
input_size = 224
|
|
|
|
# 分类
|
|
label_name = [
|
|
"american_shorthair",
|
|
"bengal",
|
|
"british_shorthair",
|
|
"exotic_shorthair",
|
|
"maine_coon",
|
|
"ragdoll",
|
|
"scottish_fold",
|
|
"siamese",
|
|
"sphynx",
|
|
"turkish_van",
|
|
]
|
|
num_classes = len(label_name) |