NNFS
Neural network library from scratch
Loading...
Searching...
No Matches
Model.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Dense>
4
5#include "../Layer/Layer.hpp"
6#include "../Loss/Loss.hpp"
7
8namespace NNFS
9{
10
18 class Model
19 {
20 public:
24 virtual ~Model() = default;
25
39 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;
40
41 private:
52 virtual void backward(Eigen::MatrixXd &predicted, const Eigen::MatrixXd &labels) = 0;
53
61 virtual void forward(Eigen::MatrixXd &x) = 0;
62 };
63
64} // namespace NNFS
Abstract base class for the model in a neural network.
Definition Model.hpp:19
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.
Definition Activation.hpp:6