24 #ifndef TVM_TOPI_NN_MAPPING_H_
25 #define TVM_TOPI_NN_MAPPING_H_
50 std::string name =
"ScaleShift", std::string tag =
kBroadcast) {
54 return x(b, c, h, w) * scale(c) + shift(c);
71 std::string name =
"ScaleShift", std::string tag =
kBroadcast) {
75 return x(b, h, w, c) * scale(c) + shift(c);
Tensor structure representing a possible input, or intermediate computation result.
Definition: tensor.h:100
Checked scalar view over a VarNode.
Definition: var.h:127
Tensor expression language DSL.
Definition: extracted_task.h:32
Tensor compute(ffi::Array< PrimExpr > shape, FCompute fcompute, std::string name="tensor", std::string tag="", ffi::Map< ffi::String, ffi::Any > attrs={})
Construct a new tensor by computing over shape, using the computation rule: result_tensor[axis] = fco...
Tensor scale_shift_nchw(const Tensor &x, const Tensor &scale, const Tensor &shift, std::string name="ScaleShift", std::string tag=kBroadcast)
Scale and shift with NCHW order.
Definition: mapping.h:49
Tensor scale_shift_nhwc(const Tensor &x, const Tensor &scale, const Tensor &shift, std::string name="ScaleShift", std::string tag=kBroadcast)
Scale and shift with NHWC order.
Definition: mapping.h:70
constexpr auto kBroadcast
Definition: tags.h:36
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition: analyzer.h:40
Operation node can generate one or multiple Tensors.