larroy commented on a change in pull request #14728: [MXNET-1386] fix for shape
mismatch
URL: https://github.com/apache/incubator-mxnet/pull/14728#discussion_r297431221
##########
File path: src/executor/graph_executor.cc
##########
@@ -558,20 +558,31 @@ void GraphExecutor::InitArguments(const
nnvm::IndexedGraph& idx,
const std::unordered_set<std::string>&
shared_arg_names,
const Executor* shared_exec,
std::unordered_map<std::string, NDArray>*
shared_buffer,
+ std::vector<std::string>* in_names,
std::vector<NDArray>* in_arg_vec,
std::vector<NDArray>* arg_grad_vec,
std::vector<NDArray>* aux_state_vec) {
+ // build name/index map for graph input nodes
+ std::map<std::string, uint32_t> inv_name_map;
Review comment:
Is it possible to map the source node instead of the argument name for
efficiency and to avoid the problem @ptrendx mentions below? I don't know if
it's possible but looking up ptr is much faster than str.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services