ptrendx commented on a change in pull request #16817: Fix InferType logic - add backward inference for some ops URL: https://github.com/apache/incubator-mxnet/pull/16817#discussion_r347066250
########## File path: src/operator/contrib/deformable_convolution-inl.h ########## @@ -453,18 +454,10 @@ class DeformableConvolutionProp : public OperatorProperty { std::vector<int> *out_type, std::vector<int> *aux_type) const override { CHECK_GE(in_type->size(), 1U); - int dtype = (*in_type)[0]; - CHECK_NE(dtype, -1) << "First input must have specified type"; - for (size_t i = 0; i < in_type->size(); ++i) { - if ((*in_type)[i] == -1) { - (*in_type)[i] = dtype; - } else { - UNIFORM_TYPE_CHECK((*in_type)[i], dtype, ListArguments()[i]); - } - } - out_type->clear(); - out_type->push_back(dtype); Review comment: Wow, this would just discard the type inferred by the other operators... ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services