|
OpenNN
Open-source neural networks library
|
Per-optimizer scratch state shared across iterations. More...
#include <optimizer.h>
Public Member Functions | |
| OptimizerData ()=default | |
| Default constructor; data buffer left empty. | |
| virtual | ~OptimizerData ()=default |
| Virtual destructor. | |
| virtual void | print () const |
| Prints a human-readable summary of the scratch state. | |
| void | set (const vector< Shape > &slot_shapes, Device device=Device::CPU) |
| Allocates the scratch buffer and slices it into views. | |
Public Attributes | |
| Buffer | data |
| Owning storage for the per-slot scratch tensors. | |
| vector< TensorView > | views |
| Per-slot non-owning views into data. | |
| VectorR | potential_parameters |
| Candidate parameter vector used by line searches. | |
| VectorR | training_direction |
| Current search direction (e.g. quasi-Newton step). | |
| float | initial_learning_rate = 0.0f |
| Initial learning rate at the start of a line search. | |
| Index | iteration = 0 |
| Iteration counter used by adaptive optimizers. | |
Per-optimizer scratch state shared across iterations.
Holds an owning data buffer plus a vector of TensorViews into it (slot shapes are decided by the subclass), and three small fields used by line-search-based methods.
|
default |
Default constructor; data buffer left empty.
|
virtualdefault |
Virtual destructor.
|
virtual |
Prints a human-readable summary of the scratch state.
| void opennn::OptimizerData::set | ( | const vector< Shape > & | slot_shapes, |
| Device | device = Device::CPU ) |
Allocates the scratch buffer and slices it into views.
| slot_shapes | Per-slot tensor shapes. |
| device | CPU or GPU memory placement. |
| Buffer opennn::OptimizerData::data |
Owning storage for the per-slot scratch tensors.
| float opennn::OptimizerData::initial_learning_rate = 0.0f |
Initial learning rate at the start of a line search.
| Index opennn::OptimizerData::iteration = 0 |
Iteration counter used by adaptive optimizers.
| VectorR opennn::OptimizerData::potential_parameters |
Candidate parameter vector used by line searches.
| VectorR opennn::OptimizerData::training_direction |
Current search direction (e.g. quasi-Newton step).
| vector<TensorView> opennn::OptimizerData::views |
Per-slot non-owning views into data.