From bcf96769e61d5a58061eec7bc37c4aaa577ce20b Mon Sep 17 00:00:00 2001 From: reminisce Date: Fri, 23 Jun 2017 11:23:03 -0700 Subject: [PATCH] Clean up --- src/executor/infer_graph_attr_pass.cc | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/executor/infer_graph_attr_pass.cc b/src/executor/infer_graph_attr_pass.cc index 9a2f126fd93f..fb098f818f43 100644 --- a/src/executor/infer_graph_attr_pass.cc +++ b/src/executor/infer_graph_attr_pass.cc @@ -10,27 +10,6 @@ namespace mxnet { namespace exec { -template -nnvm::Graph InitAttrVector(nnvm::Graph&& g, - const std::string& attr_input_name, - std::vector* attr_vec) { - const AttrVector& attr_args= g.GetAttr(attr_input_name); - CHECK_LE(attr_args.size(), idx.input_nodes().size()) - << "More provided shapes than number of arguments."; - for (size_t i = 0; i < attr_args.size(); ++i) { - (*attr_vec)[idx.entry_id(idx.input_nodes()[i], 0)] = attr_args[i]; - } - - // specialize for attr_input_name = "storage_type_inputs" - // populate ctx for - if (attr_input_name == "storage_type_inputs") { - } - - // erase the provided arguments - g.attrs.erase(attr_input_name); - return g; -} - template nnvm::Graph InferAttr(nnvm::Graph &&ret, const AttrType empty_val, @@ -66,7 +45,7 @@ nnvm::Graph InferAttr(nnvm::Graph &&ret, if (ret.attrs.count(input_name) != 0) { const AttrVector& shape_args = ret.GetAttr(input_name); CHECK_LE(shape_args.size(), idx.input_nodes().size()) - << "More provided shapes than number of arguments."; + << "More provided " << attr_name << "s than number of arguments."; for (size_t i = 0; i < shape_args.size(); ++i) { rshape[idx.entry_id(idx.input_nodes()[i], 0)] = shape_args[i]; }