24 lines
No EOL
724 B
C++
Executable file
24 lines
No EOL
724 B
C++
Executable file
#ifndef EVAL_MAXPOOL2D_H
|
|
#define EVAL_MAXPOOL2D_H
|
|
|
|
#include "eval_op.h"
|
|
|
|
typedef std::map<std::string, std::shared_ptr<eval_op>> eval_op_proto_map;
|
|
|
|
class eval_maxpool2d: public eval_op {
|
|
tensor value_;
|
|
std::shared_ptr<eval_op> clone(const expression &expr) override;
|
|
public:
|
|
eval_maxpool2d () {}
|
|
eval_maxpool2d(const expression &expr);
|
|
void eval(vars_type &variables, const kwargs_type &kwargs) override;
|
|
static void store_prototype(eval_op_proto_map &proto_map) {
|
|
assert(proto_map.find("MaxPool2d") == proto_map.end());
|
|
proto_map["MaxPool2d"] = std::make_shared<eval_maxpool2d>(); // where is expr?
|
|
}
|
|
private:
|
|
int kernel_size;
|
|
int stride;
|
|
}; // class eval_linear
|
|
|
|
#endif |