Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
reminisce committed May 10, 2017
1 parent 6c6bb0a commit b4e232a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/c_api/c_api_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int MXExecutorSimpleBind(SymbolHandle symbol_handle,
if (nullptr == provided_arg_dtypes) { // use attr_dict
for (const auto& arg_name : in_arg_names) {
const auto it = attr_dict.find(arg_name);
if (it == attr_dict.end() || !it->second.count("__ctx_group__")) {
if (it == attr_dict.end() || !it->second.count("__dtype__")) {
arg_dtype_map[arg_name] = mshadow::kFloat32;
}
}
Expand Down Expand Up @@ -410,6 +410,7 @@ int MXExecutorSimpleBind(SymbolHandle symbol_handle,
ret->ret_handles.push_back(new NDArray(nd));
}
if (in_arg_vec.size() > 0) {
*num_in_args = in_arg_vec.size();
*in_args = &(ret->ret_handles[nd_idx]);
nd_idx = ret->ret_handles.size();
}
Expand All @@ -433,6 +434,7 @@ int MXExecutorSimpleBind(SymbolHandle symbol_handle,
ret->ret_handles.push_back(new NDArray(nd));
}
if (aux_state_vec.size() > 0) {
*num_aux_states = aux_state_vec.size();
*aux_states = &(ret->ret_handles[nd_idx]);
nd_idx = ret->ret_handles.size();
}
Expand Down

0 comments on commit b4e232a

Please sign in to comment.