mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 09:44:28 +00:00
32 lines
651 B
C++
32 lines
651 B
C++
#ifndef CUDANET_MODULE_H
|
|
#define CUDANET_MODULE_H
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
#include "layer.cuh"
|
|
|
|
namespace CUDANet {
|
|
|
|
class Module : public Layers::SequentialLayer {
|
|
public:
|
|
virtual float* forward(const float* d_input) = 0;
|
|
|
|
int getOutputSize();
|
|
int getInputSize();
|
|
|
|
void addLayer(const std::string& name, Layers::SequentialLayer* layer);
|
|
|
|
const std::vector<std::pair<std::string, Layers::SequentialLayer*>>& getLayers() const;
|
|
|
|
protected:
|
|
std::vector<std::pair<std::string, Layers::SequentialLayer*>> layers;
|
|
|
|
int outputSize;
|
|
int inputSize;
|
|
};
|
|
|
|
} // namespace CUDANet
|
|
|
|
#endif |