Solver

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

The base solver class to optimize parameters.

__init__

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

Create a Solver.

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

Properties

base_lr

Solver.base_lr

Return or Set the current learning rate.

Returns:
float – The current learning rate.

iter

Solver.iter

Return or Set the current iteration.

Returns:
int – The current iteration.

net

Solver.net

Return the train net.

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

test_nets

Solver.test_nets

Return the test nets.

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

Methods

snapshot

Solver.snapshot()[source]

Snapshot the parameters of train net.

step

Solver.step(num_iterations=1)[source]

Step the train net.

Parameters:
  • num_iterations (int, optional, default=1) – The number of iterations to step.