AdamSolver

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

The Adam solver. [Kingma & Ba, 2014].

Following hyper parameters will be taken:

caffe_pb2.SolverParameter(
    base_lr=0.,
    momentum=0.,
    momentum2=0.999,
    delta=1e-8,
)

__init__

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

Create a AdamSolver.

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

Properties

base_lr

AdamSolver.base_lr

Return or Set the current learning rate.

Returns:
float – The current learning rate.

iter

AdamSolver.iter

Return or Set the current iteration.

Returns:
int – The current iteration.

net

AdamSolver.net

Return the train net.

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

test_nets

AdamSolver.test_nets

Return the test nets.

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

Methods

snapshot

AdamSolver.snapshot()

Snapshot the parameters of train net.

step

AdamSolver.step(num_iterations)

Step the train net.

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