reminisce commented on a change in pull request #10078: Support float16 in L2Normalization operator URL: https://github.com/apache/incubator-mxnet/pull/10078#discussion_r174235637
########## File path: src/operator/l2_normalization-inl.h ########## @@ -235,6 +247,19 @@ class L2NormalizationProp : public OperatorProperty { return param_.__DICT__(); } + bool InferType(std::vector<int> *in_type, + std::vector<int> *out_type, + std::vector<int> *aux_type) const override { + CHECK_EQ(in_type->size(), 1U); + int dtype = (*in_type)[0]; + CHECK_NE(dtype, -1) << "Input must have specified type"; Review comment: Please use mutual inference instead of terminating the program. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services