NesterovSolver

class dragon.vm.caffe.NesterovSolver(
  solver_file,
  is_root=True
)[source]

The Nesterov-SGD solver. [Sutskever et.al, 2013].

Following hyper parameters will be taken:

caffe_pb2.SolverParameter(
    base_lr=0.,
    momentum=0.,
)

__init__

NesterovSolver.__init__(
  solver_file,
  is_root=True
)[source]

Create a NesterovSolver.

Parameters:
  • solver_file (str) – The path of solver file.
  • is_root (bool, optional, default=True) – True to indicate a root solver.

Properties

base_lr

NesterovSolver.base_lr

Return or Set the current learning rate.

Returns:
float – The current learning rate.

iter

NesterovSolver.iter

Return or Set the current iteration.

Returns:
int – The current iteration.

net

NesterovSolver.net

Return the train net.

Returns:
dragon.vm.caffe.Net – The train net.

test_nets

NesterovSolver.test_nets

Return the test nets.

Returns:
Sequence[dragon.vm.caffe.Net] – The test nets.

Methods

snapshot

NesterovSolver.snapshot()

Snapshot the parameters of train net.

step

NesterovSolver.step(num_iterations)

Step the train net.

Parameters:
  • num_iterations (int) – The number of iterations to step.