You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
The text was updated successfully, but these errors were encountered:
tobegit3hub
changed the title
The method scale_shift_nchw in C should add shift to the values of channel
The method scale_shift_nchw in C should add shift from the values of channel
May 27, 2020
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
andscale_shift_nhwc
should apply scale and shift from the values of channel. There is 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?The text was updated successfully, but these errors were encountered: