【问题标题】:How to take network snaphot in Caffe on demand?如何在按需咖啡中拍摄网络快照?
【发布时间】:2018-07-08 12:06:42
【问题描述】:

我希望能够在训练进行时按需(比如在某些情况下)拍摄网络快照。有没有办法用 Caffe 做到这一点?

【问题讨论】:

  • 用python训练就可以做到
  • 您能否提供更多关于如何在 python 中完成此操作的详细信息?

标签: deep-learning caffe pycaffe


【解决方案1】:

以 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()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-11-07
    • 1970-01-01
    • 2017-12-25
    • 1970-01-01
    • 1970-01-01
    • 2019-12-19
    • 2013-11-17
    • 1970-01-01
    相关资源
    最近更新 更多