anirudhacharya commented on a change in pull request #13226: [MXNet-1211]
Factor and "Like" modes in BilinearResize2D operator
URL: https://github.com/apache/incubator-mxnet/pull/13226#discussion_r235563020
##########
File path: src/operator/contrib/bilinear_resize-inl.h
##########
@@ -105,8 +131,11 @@ inline void BilinearSampleOpBackward(const
nnvm::NodeAttrs& attrs,
const std::vector<TBlob> &inputs,
const std::vector<OpReqType> &req,
const std::vector<TBlob> &outputs) {
- CHECK_EQ(inputs.size(), 1U);
- CHECK_EQ(outputs.size(), 1U);
+ const BilinearSampleParam& param =
nnvm::get<BilinearSampleParam>(attrs.parsed);
+ CHECK_EQ(inputs.size(), 1);
+ bool modeLike = param.mode == bilinear_resize::like;
+ size_t expected = modeLike ? 2 : 1;
+ CHECK_EQ(outputs.size(), expected);
Review comment:
so there will be 2 outputs in `like` mode? what is the second output? if it
does have two outputs, it should be specified in the param description.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services