mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 01:34:22 +00:00
39 lines
702 B
Plaintext
39 lines
702 B
Plaintext
#ifndef CUDANET_AVG_POOLING_H
|
|
#define CUDANET_AVG_POOLING_H
|
|
|
|
#include "activation.cuh"
|
|
#include "layer.cuh"
|
|
|
|
namespace CUDANet::Layers {
|
|
|
|
class AvgPooling2D : public SequentialLayer {
|
|
public:
|
|
AvgPooling2D(
|
|
int inputSize,
|
|
int nChannels,
|
|
int poolingSize,
|
|
int stride,
|
|
ActivationType activationType
|
|
);
|
|
~AvgPooling2D();
|
|
|
|
float* forward(const float* d_input);
|
|
|
|
private:
|
|
int inputSize;
|
|
int nChannels;
|
|
int poolingSize;
|
|
int stride;
|
|
|
|
int outputSize;
|
|
int gridSize;
|
|
|
|
float* d_output;
|
|
|
|
Activation activation;
|
|
};
|
|
|
|
} // namespace CUDANet::Layers
|
|
|
|
#endif // CUDANET_AVG_POOLING_H
|