tobegit3hub opened a new issue #5678: URL: https://github.com/apache/incubator-tvm/issues/5678
It is a little confused for me when reading the source code of https://github.com/apache/incubator-tvm/blob/master/topi/include/topi/nn/mapping.h#L51 . The `scale_shift_nchw` and `scale_shift_nhwc` should apply scale and shift to the values of channel. There are another implementation in Python topi which seems to be right in https://github.com/apache/incubator-tvm/blob/master/topi/python/topi/nn/mapping.py#L44 . Should we change the implementation of `scale_shift_nchw` to this? ``` inline Tensor scale_shift_nchw(const Tensor& x, const Tensor& scale, const Tensor& shift, std::string name = "ScaleShift", std::string tag = kBroadcast) { return tvm::te::compute( x->shape, [&](Var b, Var c, Var h, Var w) { return x(b, c, h, w) * scale(c) + shift(c); }, name, tag); } ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
