Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Wang committed Jan 15, 2019
1 parent c453b3a commit c1a4876
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
19 changes: 6 additions & 13 deletions nnvm/src/top/tensor/elemwise.cc
Original file line number Diff line number Diff line change
Expand Up @@ -777,12 +777,10 @@ NNVM_REGISTER_ELEMWISE_BINARY_SCALAR(__equal_scalar__)
"FTVMCompute", [](const NodeAttrs& attrs,
const Array<Tensor>& inputs,
const Array<Tensor>& out_info) {

Tensor out = topi::cast(
binary_scalar_op(attrs, inputs[0],
[](Expr x, Expr y) { return x == y; }),
out_info[0]->dtype
);
out_info[0]->dtype);
return Array<Tensor>{ out };
})
.set_attr<nnvm::FGradient>("FGradient", MakeZeroGradNodes);
Expand All @@ -799,8 +797,7 @@ NNVM_REGISTER_ELEMWISE_BINARY_SCALAR(__not_equal_scalar__)
Tensor out = topi::cast(
binary_scalar_op(attrs, inputs[0],
[](Expr x, Expr y) { return x != y; }),
out_info[0]->dtype
);
out_info[0]->dtype);
return Array<Tensor>{ out };
})
.set_attr<nnvm::FGradient>("FGradient", MakeZeroGradNodes);
Expand All @@ -817,8 +814,7 @@ NNVM_REGISTER_ELEMWISE_BINARY_SCALAR(__greater_scalar__)
Tensor out = topi::cast(
binary_scalar_op(attrs, inputs[0],
[](Expr x, Expr y) { return x > y; }),
out_info[0]->dtype
);
out_info[0]->dtype);
return Array<Tensor>{ out };
})
.set_attr<nnvm::FGradient>("FGradient", MakeZeroGradNodes);
Expand All @@ -835,8 +831,7 @@ NNVM_REGISTER_ELEMWISE_BINARY_SCALAR(__greater_equal_scalar__)
Tensor out = topi::cast(
binary_scalar_op(attrs, inputs[0],
[](Expr x, Expr y) { return x >= y; }),
out_info[0]->dtype
);
out_info[0]->dtype);
return Array<Tensor>{ out };
})
.set_attr<nnvm::FGradient>("FGradient", MakeZeroGradNodes);
Expand All @@ -853,8 +848,7 @@ NNVM_REGISTER_ELEMWISE_BINARY_SCALAR(__less_scalar__)
Tensor out = topi::cast(
binary_scalar_op(attrs, inputs[0],
[](Expr x, Expr y) { return x < y; }),
out_info[0]->dtype
);
out_info[0]->dtype);
return Array<Tensor>{ out };
})
.set_attr<nnvm::FGradient>("FGradient", MakeZeroGradNodes);
Expand All @@ -871,8 +865,7 @@ NNVM_REGISTER_ELEMWISE_BINARY_SCALAR(__less_equal_scalar__)
Tensor out = topi::cast(
binary_scalar_op(attrs, inputs[0],
[](Expr x, Expr y) { return x <= y; }),
out_info[0]->dtype
);
out_info[0]->dtype);
return Array<Tensor>{ out };
})
.set_attr<nnvm::FGradient>("FGradient", MakeZeroGradNodes);
Expand Down
2 changes: 1 addition & 1 deletion topi/include/topi/nn/l2_normalize.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ inline Tensor l2_normalize(const Tensor& data,
for (size_t i = 0; i < axis.size(); ++i) {
int ax = topi::detail::GetConstInt(axis[i]);
CHECK_LT(ax, data->shape.size()) <<
"Axis " << ax << " exceeds input data dim " <<
"Axis " << ax << " exceeds input data dim " <<
data->shape.size();
}
auto input_shape = data->shape;
Expand Down

0 comments on commit c1a4876

Please sign in to comment.