Browse Source

load initial weights for multi graph

tags/v1.1.0
Harshvardhan Gupta 5 years ago
parent
commit
0e47952d6d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      mindspore/ccsrc/debug/debugger/debugger.cc

+ 6
- 0
mindspore/ccsrc/debug/debugger/debugger.cc View File

@@ -288,6 +288,12 @@ void Debugger::PreExecute(const KernelGraphPtr &graph_ptr, uint32_t graph_sum) {
if (debugger_enabled_) {
if (graph_proto_list_.size()) {
// only send compiled graphs once.
auto dbg_graph_ptr = graph_ptr_;
// use current graph ptr to load parameters
graph_ptr_ = graph_ptr;
LoadParametersAndConst();
// revert graph ptr to original value
graph_ptr_ = dbg_graph_ptr;
SendMultiGraphsAndSuspend(graph_proto_list_, graph_sum);
graph_proto_list_.clear();
} else if (graph_id == rungraph_id_list_.front() && device_target_ == kGPUDevice) {


Loading…
Cancel
Save