This repository has been archived on 2026-02-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tkDNN/src/Layer.cpp
T
Francesco Gatti 0e97452460 dects dont works
2019-02-05 20:09:47 +00:00

29 lines
635 B
C++

#include <iostream>
#include "Layer.h"
namespace tk { namespace dnn {
Layer::Layer(Network *net) {
this->net = net;
if(net != nullptr) {
this->input_dim = net->getOutputDim();
this->output_dim = input_dim;
checkCUDNN( cudnnCreateTensorDescriptor(&srcTensorDesc) );
checkCUDNN( cudnnCreateTensorDescriptor(&dstTensorDesc) );
if(!net->addLayer(this))
FatalError("Net reached max number of layers");
}
}
Layer::~Layer() {
checkCUDNN( cudnnDestroyTensorDescriptor(srcTensorDesc) );
checkCUDNN( cudnnDestroyTensorDescriptor(dstTensorDesc) );
}
}}