NNFS
Neural network library from scratch
Loading...
Searching...
No Matches
NNFS::Model Class Referenceabstract

Abstract base class for the model in a neural network. More...

#include <Model.hpp>

Inheritance diagram for NNFS::Model:
[legend]

Public Member Functions

virtual ~Model ()=default
 Basic destructor.
 
virtual void fit (const Eigen::MatrixXd &examples, const Eigen::MatrixXd &labels, const Eigen::MatrixXd &test_examples, const Eigen::MatrixXd &test_labels, int epochs, int batch_size, bool verbose=false)=0
 Evaluate the model on the given examples.
 

Detailed Description

Abstract base class for the model in a neural network.

This class is the abstract base class for the model in a neural network. It provides the interface for all models.

Todo:
Add support for callbacks

Constructor & Destructor Documentation

◆ ~Model()

virtual NNFS::Model::~Model ( )
virtualdefault

Basic destructor.

Member Function Documentation

◆ fit()

virtual void NNFS::Model::fit ( const Eigen::MatrixXd &  examples,
const Eigen::MatrixXd &  labels,
const Eigen::MatrixXd &  test_examples,
const Eigen::MatrixXd &  test_labels,
int  epochs,
int  batch_size,
bool  verbose = false 
)
pure virtual

Evaluate the model on the given examples.

Parameters
[in]examplesExamples to evaluate the model on
[in]labelsLabels of the examples
[in]test_examplesExamples to validate the model on
[in]test_labelsLabels of the validation examples
[in]epochsThe number of epochs to train for
[in]batch_sizeThe batch size, i.e. the number of examples to train on in each batch
[in]verboseWhether to print out information about the training process
Note
This is a pure virtual function and must be implemented by the derived class.

Implemented in NNFS::NeuralNetwork.


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