Browse Source

!947 fix input value convert issue in graph mode

Merge pull request !947 from wangqiuliang/fix-input-value-convert-issue
tags/v0.3.0-alpha
mindspore-ci-bot Gitee 5 years ago
parent
commit
4abe183700
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      mindspore/ccsrc/pipeline/pipeline.cc

+ 6
- 1
mindspore/ccsrc/pipeline/pipeline.cc View File

@@ -601,7 +601,12 @@ void ExecutorPy::ProcessVmArg(const py::tuple &args, const std::string &phase, V
if (ms_context->backend_policy() == kMsConvert && py::isinstance<py::array>(arg)) {
MS_LOG(EXCEPTION) << "Args[" << i << "] is numpy array, not tensor";
}
arg_list->push_back(arg);
ValuePtr converted = nullptr;
bool succ = parse::ConvertData(arg, &converted);
if (!succ) {
MS_LOG(EXCEPTION) << "Args convert error";
}
arg_list->push_back(converted);
}

ResourcePtr res = GetResource(phase);


Loading…
Cancel
Save