haojin2 commented on a change in pull request #17283: [NumPy]Set numpy default dtype URL: https://github.com/apache/incubator-mxnet/pull/17283#discussion_r409856213
########## File path: src/operator/tensor/init_op.h ########## @@ -288,12 +289,25 @@ struct InitOpWithScalarParam : dmlc::Parameter<InitOpWithScalarParam> { .set_default("") .describe("Context of output, in format [cpu|gpu|cpu_pinned](n)." "Only used for imperative calls."); - DMLC_DECLARE_FIELD(dtype).set_default(mshadow::kFloat32) + DMLC_DECLARE_FIELD(dtype) + .set_default(-1) + .add_enum("None", -1) MXNET_ADD_ALL_TYPES_WITH_BOOL .describe("Target data type."); DMLC_DECLARE_FIELD(value) .describe("Value with which to fill newly created tensor"); } + void SetAttrDict(std::unordered_map<std::string, std::string>* dict) { Review comment: one more blank line above. ---------------------------------------------------------------- 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