anirudh2290 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_r347066890
##########
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:
yep, many operators behave this way. probably more than what we have captured in the issue
list :)
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
|