Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wweic committed Mar 2, 2019
1 parent 54e8793 commit c7bcdf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nnvm/include/nnvm/op_attr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ using FCorrectLayout = std::function<bool(
* \return success flag.
*/
using FCorrectLayoutEx = std::function<bool(
NodeAttrs& attrs,
const NodeAttrs& attrs,
std::vector<TShape>* ishapes,
std::vector<Layout>* ilayouts,
const std::vector<Layout>* last_ilayouts,
Expand Down
6 changes: 4 additions & 2 deletions nnvm/src/top/nn/nn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@ inline bool BatchNormInferShape(const nnvm::NodeAttrs& attrs,
return true;
}

inline bool BatchNormCorrectLayout(NodeAttrs& attrs,
inline bool BatchNormCorrectLayout(const NodeAttrs& attrs_const,
std::vector<TShape>* ishapes,
std::vector<Layout> *in_layouts,
const std::vector<Layout> *last_in_layouts,
std::vector<Layout> *out_layouts) {
NodeAttrs& attrs = const_cast<NodeAttrs&>(attrs_const);
const BatchNormParam& param = nnvm::get<BatchNormParam>(attrs.parsed);
CHECK_EQ(in_layouts->size(), 5U);
CHECK_EQ(last_in_layouts->size(), 5U);
Expand Down Expand Up @@ -593,11 +594,12 @@ inline bool PadInferShape(const nnvm::NodeAttrs& attrs,
return true;
}

inline bool PadCorrectLayout(NodeAttrs& attrs,
inline bool PadCorrectLayout(const NodeAttrs& attrs_const,
std::vector<TShape>* ishapes,
std::vector<Layout>* ilayouts,
const std::vector<Layout>* last_ilayouts,
std::vector<Layout>* olayouts) {
NodeAttrs& attrs = const_cast<NodeAttrs&>(attrs_const);
const PadParam& param = nnvm::get<PadParam>(attrs.parsed);
const auto& last_layout = last_ilayouts->at(0);
Layout layout = ilayouts->at(0);
Expand Down

0 comments on commit c7bcdf2

Please sign in to comment.