#ifndef CUDANET_MODULE_H #define CUDANET_MODULE_H #include #include #include #include "layer.cuh" namespace CUDANet { class Module : public Layers::SequentialLayer { public: virtual ~Module() = 0; virtual float* forward(const float* d_input) = 0; int getOutputSize(); int getInputSize(); void addLayer(const std::string& name, Layers::SequentialLayer* layer); Layers::SequentialLayer* getLayer(const std::string& name); const std::unordered_map& getLayers() const; protected: int inputSize; int inputChannels; int outputSize; int outputChannels; std::vector> layers; std::unordered_map layerMap; }; } // namespace CUDANet #endif