MyCaffe  1.11.8.27
Deep learning software for Windows C# programmers.
MyCaffe.common.SnapshotArgs Class Reference

The SnapshotArgs is sent to the Solver::OnSnapshot event which fires each time the Solver::Snapshot method is called. More...

Inheritance diagram for MyCaffe.common.SnapshotArgs:

Public Member Functions

 SnapshotArgs (byte[] rgState, byte[] rgWeights, double dfAccuracy, double dfError, int nIteration, SNAPSHOT_WEIGHT_UPDATE_METHOD favor)
 The SnapshotArgs constructor. More...
 
byte[] UpdateState ()
 Retrieves the updated Solver state as an array of bytes. More...
 
byte[] UpdateWeights ()
 Retrieves the updated training Net weights as an array of bytes. More...
 

Properties

byte[] State [getset]
 Get/set the Solver State. More...
 
byte[] Weights [getset]
 Get/set the Weights. More...
 
double Accuracy [get]
 Returns the last observed Solver accuracy for the current training session. More...
 
double Error [get]
 Returns the last observed Solver error for the current training session. More...
 
int Iteration [get]
 Returns the current iteration of the current training session. More...
 
SNAPSHOT_WEIGHT_UPDATE_METHOD Favor [get]
 Specifies whether to favor the error, the accuracy or both when deciding whether a snapshot should take place. More...
 
bool IncludeWeights [getset]
 Get/set whether or not to include the weights in the snapshot. More...
 
bool IncludeState [getset]
 Get/set whether or not to include the Solver state in the snapshot. More...
 
bool SingleStep [getset]
 Get/set the Solver single step. More...
 
bool Forced [getset]
 Get/set whether or not the snapshot was forced or not. More...
 
bool Scheduled [getset]
 Get/set whether or not the snapshot is a regular scheduled snapshot (e.g. not an improved accuracy or forced snapshot) More...
 
bool UpdateDatabase [getset]
 Get/set whether or not to update the database (default = true). More...
 

Events

EventHandler< GetBytesArgsOnGetWeights
 Specifies the OnGetWeights event which fires when the SnapshotArgs::UpdateWeights method is called. More...
 
EventHandler< GetBytesArgsOnGetState
 Specifies the OnGetState event which fires when the SnapshotArgs::UpdateState method is called. More...
 

Detailed Description

The SnapshotArgs is sent to the Solver::OnSnapshot event which fires each time the Solver::Snapshot method is called.

Definition at line 415 of file EventArgs.cs.

Constructor & Destructor Documentation

◆ SnapshotArgs()

MyCaffe.common.SnapshotArgs.SnapshotArgs ( byte[]  rgState,
byte[]  rgWeights,
double  dfAccuracy,
double  dfError,
int  nIteration,
SNAPSHOT_WEIGHT_UPDATE_METHOD  favor 
)

The SnapshotArgs constructor.

Parameters
rgStateSpecifies the current Solver state as an array of bytes.
rgWeightsSpecifies the current training Net weights as an array of bytes.
dfAccuracySpecifies the last accuracy observed in the training Net.
dfErrorSpecifies the last error observed in the training Net.
nIterationSpecifies the current iteration of training.
favorSpecifies whether to favor the error value or the accuracy value when deciding whether or not a snapshot should take place.

Definition at line 455 of file EventArgs.cs.

Member Function Documentation

◆ UpdateState()

byte[] MyCaffe.common.SnapshotArgs.UpdateState ( )

Retrieves the updated Solver state as an array of bytes.

Returns
The state is returned as an array of bytes.

Definition at line 469 of file EventArgs.cs.

◆ UpdateWeights()

byte[] MyCaffe.common.SnapshotArgs.UpdateWeights ( )

Retrieves the updated training Net weights as an array of bytes.

Returns
The training Net weights are returned as an array of bytes.

Definition at line 486 of file EventArgs.cs.

Property Documentation

◆ Accuracy

double MyCaffe.common.SnapshotArgs.Accuracy
get

Returns the last observed Solver accuracy for the current training session.

Definition at line 520 of file EventArgs.cs.

◆ Error

double MyCaffe.common.SnapshotArgs.Error
get

Returns the last observed Solver error for the current training session.

Definition at line 528 of file EventArgs.cs.

◆ Favor

SNAPSHOT_WEIGHT_UPDATE_METHOD MyCaffe.common.SnapshotArgs.Favor
get

Specifies whether to favor the error, the accuracy or both when deciding whether a snapshot should take place.

Definition at line 544 of file EventArgs.cs.

◆ Forced

bool MyCaffe.common.SnapshotArgs.Forced
getset

Get/set whether or not the snapshot was forced or not.

Definition at line 579 of file EventArgs.cs.

◆ IncludeState

bool MyCaffe.common.SnapshotArgs.IncludeState
getset

Get/set whether or not to include the Solver state in the snapshot.

Definition at line 561 of file EventArgs.cs.

◆ IncludeWeights

bool MyCaffe.common.SnapshotArgs.IncludeWeights
getset

Get/set whether or not to include the weights in the snapshot.

Definition at line 552 of file EventArgs.cs.

◆ Iteration

int MyCaffe.common.SnapshotArgs.Iteration
get

Returns the current iteration of the current training session.

Definition at line 536 of file EventArgs.cs.

◆ Scheduled

bool MyCaffe.common.SnapshotArgs.Scheduled
getset

Get/set whether or not the snapshot is a regular scheduled snapshot (e.g. not an improved accuracy or forced snapshot)

Definition at line 588 of file EventArgs.cs.

◆ SingleStep

bool MyCaffe.common.SnapshotArgs.SingleStep
getset

Get/set the Solver single step.

Definition at line 570 of file EventArgs.cs.

◆ State

byte [] MyCaffe.common.SnapshotArgs.State
getset

Get/set the Solver State.

Definition at line 502 of file EventArgs.cs.

◆ UpdateDatabase

bool MyCaffe.common.SnapshotArgs.UpdateDatabase
getset

Get/set whether or not to update the database (default = true).

Definition at line 597 of file EventArgs.cs.

◆ Weights

byte [] MyCaffe.common.SnapshotArgs.Weights
getset

Get/set the Weights.

Definition at line 511 of file EventArgs.cs.

Event Documentation

◆ OnGetState

EventHandler<GetBytesArgs> MyCaffe.common.SnapshotArgs.OnGetState

Specifies the OnGetState event which fires when the SnapshotArgs::UpdateState method is called.

The Solver hooks into these events so that it can access the Solver state and return it to the caller of the SnapshotArgs::UpdateState method.

Definition at line 444 of file EventArgs.cs.

◆ OnGetWeights

EventHandler<GetBytesArgs> MyCaffe.common.SnapshotArgs.OnGetWeights

Specifies the OnGetWeights event which fires when the SnapshotArgs::UpdateWeights method is called.

The Solver hooks into these events so that it can access the training Net weights and return them to the caller of the SnapshotArgs::UpdateWeights method.

Definition at line 437 of file EventArgs.cs.


The documentation for this class was generated from the following file: