def __init__(self, solver_path = '', debug=False):
"""
Initialise solver params
If a file is given, SolverConfig is initialised with params from that file
"""
self.sp = caffe_pb2.SolverParameter()
#critical:
self.sp.base_lr = 0.01
self.sp.momentum = 0.9
if solver_path:
self.read(solver_path)
if debug:
self.sp.max_iter = 12
self.sp.display = 1
self.sp.type = 'SGD'
评论列表
文章目录