Skip to content

Conversation

@shelhamer
Copy link
Member

@shelhamer shelhamer commented Nov 21, 2016

The solver checks its proto type (SolverParameter.type) on instantiation:

  • if the proto type is unspecified it's set according to the class type Solver::type()
  • if the proto type and class type conflict, the solver dies loudly

This helps avoid accidental instantiation of a different solver type than intended when the solver def and class differ. For instance if the solver def specifies type: "Nesterov" but one instantiates an SGDSolver with that def which type the solver is could be a surprise (it's an SGDSolver).

Guaranteed type information in the SolverParameter will simplify multi-solver coordination too; in particular it's needed for correctness of #4563.

@cypof

the solver checks its proto type (SolverParameter.type) on
instantiation:

- if the proto type is unspecified it's set according to the class type
  `Solver::type()`
- if the proto type and class type conflict, the solver dies loudly

this helps avoid accidental instantiation of a different solver type
than intended when the solver def and class differ. guaranteed type
information in the SolverParameter will simplify multi-solver
coordination too.
@shelhamer
Copy link
Member Author

Merging—CI failed due to transient networking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants