import numpy as np
import os, time, shutil
from mxnet import gluon, image, init, nd
from mxnet import autograd as ag
from mxnet.gluon import nn
from mxnet.gluon.data.vision import transforms
from gluoncv.utils import makedirs
from gluoncv.model_zoo import get_model
We set the hyperparameters as following:
save_frequency = 1
模型保存路径
save_dir = ‘./save_model’
类别数量
classes = 3
全部数据集迭代次数
epochs = 30
lr = 0.001
如果有多个gpu可以用
per_device_batch_size = 2
优化器参数
momentum = 0.9
权值衰减参数,正则作用,一抑制过拟合
wd = 0.0001
学习率调节参数
lr_factor = 0.75
lr_steps &#