forked from InfiniTensor/InfiniCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpad.hpp
More file actions
26 lines (18 loc) · 619 Bytes
/
pad.hpp
File metadata and controls
26 lines (18 loc) · 619 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include "../device.hpp"
#include "../graph/graph.hpp"
#include "common/op.hpp"
#include <string>
#include <vector>
namespace infinicore::op {
INFINICORE_GRAPH_OP_CLASS(Pad, Tensor, const Tensor &, const std::vector<int> &, const std::string &, double);
Tensor pad(const Tensor &x,
const std::vector<int> &pad,
const std::string &mode = "constant",
double value = 0.0);
void pad_(Tensor y,
const Tensor &x,
const std::vector<int> &pad,
const std::string &mode = "constant",
double value = 0.0);
} // namespace infinicore::op