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 fbe61e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 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 python/tvm/relay/frontend/mxnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def _mx_box_nms(inputs, attrs):
if out_format != 'corner':
raise RuntimeError('out_format %s is not supported.' % out_format)

ret =_op.vision.get_valid_counts(inputs[0], score_threshold=valid_thresh)
ret = _op.vision.get_valid_counts(inputs[0], score_threshold=valid_thresh)
nms_out = _op.vision.nms(ret[1], ret[0],
iou_threshold=overlap_thresh,
force_suppress=force_suppress,
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 fbe61e9

Please sign in to comment.