mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-05 17:34:21 +00:00
Migrate max pooling
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include "dense.hpp"
|
||||
#include "input.cuh"
|
||||
#include "layer.hpp"
|
||||
#include "max_pooling.cuh"
|
||||
#include "max_pooling.hpp"
|
||||
#include "output.cuh"
|
||||
|
||||
// Models
|
||||
|
||||
@@ -18,7 +18,7 @@ class MaxPooling2d : public SequentialLayer, public TwoDLayer {
|
||||
);
|
||||
~MaxPooling2d();
|
||||
|
||||
float* forward(const float* d_input);
|
||||
float* forward(const float* input);
|
||||
|
||||
/**
|
||||
* @brief Get output size
|
||||
@@ -45,9 +45,17 @@ class MaxPooling2d : public SequentialLayer, public TwoDLayer {
|
||||
|
||||
shape2d outputSize;
|
||||
|
||||
float* d_output;
|
||||
|
||||
Activation* activation;
|
||||
|
||||
float* forwardCPU(const float* input);
|
||||
|
||||
#ifdef USE_CUDA
|
||||
float* d_output;
|
||||
float* forwardCUDA(const float* d_input);
|
||||
|
||||
void initCUDA();
|
||||
void delCUDA();
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace CUDANet::Layers
|
||||
Reference in New Issue
Block a user