mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-05 17:34:21 +00:00
Implement model destructor
This commit is contained in:
@@ -25,7 +25,13 @@ Model::Model(const Model& other)
|
||||
outputLayer = new Layers::Output(*other.outputLayer);
|
||||
}
|
||||
|
||||
Model::~Model(){};
|
||||
Model::~Model(){
|
||||
delete inputLayer;
|
||||
delete outputLayer;
|
||||
for (auto layer : layers) {
|
||||
delete layer;
|
||||
}
|
||||
};
|
||||
|
||||
float* Model::predict(const float* input) {
|
||||
float* d_input = inputLayer->forward(input);
|
||||
|
||||
Reference in New Issue
Block a user