Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
added curly braces for if/else to match mxnet style
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Skalicky committed Sep 7, 2018
1 parent e3cdce3 commit 756cc80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/operator/tensor/elemwise_binary_scalar_op_extended.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ Example::
.set_num_inputs(1)
.set_num_outputs(1)
.set_attr_parser([](NodeAttrs* attrs) {
if (attrs->dict.find("scalar") != attrs->dict.end())
if (attrs->dict.find("scalar") != attrs->dict.end()) {
attrs->parsed = std::stod(attrs->dict["scalar"]);
else
} else {
attrs->parsed = 1.0;
}
})
.set_attr<nnvm::FInferShape>("FInferShape", ElemwiseShape<1, 1>)
.set_attr<nnvm::FInferType>("FInferType", ElemwiseType<1, 1>)
Expand Down

0 comments on commit 756cc80

Please sign in to comment.