Browse Source

fix wrong value of int-type Node bug in pynative

tags/v1.0.0
liangzelang 5 years ago
parent
commit
5a0e8f81f8
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      mindspore/ccsrc/pipeline/pynative/pynative_execute.cc

+ 3
- 1
mindspore/ccsrc/pipeline/pynative/pynative_execute.cc View File

@@ -772,7 +772,9 @@ std::string PynativeExecutor::GetCellId(const py::object &cell, const py::args &
if (node_abs_map_.find(arg_id) != node_abs_map_.end()) {
cell_id += node_abs_map_[arg_id]->ToString();
} else {
AbstractBasePtr abs = abstract::FromValueInside(PyAttrValue(args[i]), true);
auto abs = PyAttrValue(args[i])->ToAbstract();
auto config = abstract::AbstractBase::kBroadenTensorOnly;
abs = abs->Broaden(config);
cell_id += abs->ToString();
node_abs_map_[arg_id] = abs;
}


Loading…
Cancel
Save