Starting on the model.h, but need to make layer structs and structs for loss and optimizers
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "core/omp_config.h"
|
||||
|
||||
#include "utils/vector.h"
|
||||
#include "utils/matrix.h"
|
||||
|
||||
namespace neural_networks{
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct Layer {
|
||||
utils::Matrix<T> outputs;
|
||||
utils::Matrix<T> dinputs;
|
||||
|
||||
virtual void forward(const utils::Matrix<T>& inputs) = 0;
|
||||
virtual void backward(const utils::Matrix<T>& dvalues) = 0;
|
||||
|
||||
virtual ~Layer() = default;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user