mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-05 17:34:21 +00:00
Remove default constructor from Module
This commit is contained in:
@@ -4,29 +4,6 @@
|
||||
|
||||
using namespace CUDANet;
|
||||
|
||||
Module::Module(
|
||||
const int inputSize,
|
||||
const int inputChannels,
|
||||
const int outputSize,
|
||||
const int outputChannels
|
||||
)
|
||||
: inputSize(inputSize),
|
||||
inputChannels(inputChannels),
|
||||
outputSize(outputSize),
|
||||
outputChannels(outputChannels),
|
||||
layers(std::vector<std::pair<std::string, Layers::SequentialLayer*>>()),
|
||||
layerMap(std::unordered_map<std::string, Layers::SequentialLayer*>()) {
|
||||
d_output = nullptr;
|
||||
CUDA_CHECK(cudaMalloc(
|
||||
(void**)&d_output,
|
||||
sizeof(float) * outputSize * outputSize * outputChannels
|
||||
));
|
||||
}
|
||||
|
||||
Module::~Module() {
|
||||
cudaFree(d_output);
|
||||
}
|
||||
|
||||
void Module::addLayer(const std::string& name, Layers::SequentialLayer* layer) {
|
||||
layers.push_back({ name, layer });
|
||||
layerMap[name] = layer;
|
||||
|
||||
Reference in New Issue
Block a user