【发布时间】:2018-07-08 12:06:42
【问题描述】:
我希望能够在训练进行时按需(比如在某些情况下)拍摄网络快照。有没有办法用 Caffe 做到这一点?
【问题讨论】:
-
用python训练就可以做到
-
您能否提供更多关于如何在 python 中完成此操作的详细信息?
标签: deep-learning caffe pycaffe
我希望能够在训练进行时按需(比如在某些情况下)拍摄网络快照。有没有办法用 Caffe 做到这一点?
【问题讨论】:
标签: deep-learning caffe pycaffe
以 Python 中的回调为例:
import caffe
def OnStart():
pass # both callbacks must be defined anyway
def OnGradientsReady():
global solver
if solver.iter == 17:
solver.snapshot()
solver = caffe.get_solver("mnist/lenet_solver_t1.prototxt")
solver.add_callback(OnStart, OnGradientsReady)
solver.solve()
【讨论】: