Migrate module to tensors

This commit is contained in:
2025-11-22 18:02:42 +01:00
parent 104d6ea33d
commit ca44ea4436
3 changed files with 64 additions and 49 deletions

View File

@@ -1,32 +0,0 @@
#ifndef CUDANET_MODULE_H
#define CUDANET_MODULE_H
#include <string>
#include <unordered_map>
#include <vector>
#include "layer.hpp"
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