forked from mindspore-Ecosystem/mindspore
!23636 fix bug of modify weight between iterations
Merge pull request !23636 from limingqi107/bug_fix4
This commit is contained in:
commit
71fda2959b
|
@ -120,17 +120,15 @@ void DataPrepareActor::PrepareData(const std::vector<std::vector<TensorPtr>> &in
|
|||
OpContext<DeviceTensor> *const context) {
|
||||
MS_EXCEPTION_IF_NULL(context);
|
||||
|
||||
if (first_running_) {
|
||||
// Convert actor running data from input tensors.
|
||||
if (input_tensors.size() > 0) {
|
||||
PrepareDataForDeviceTensorStore(input_tensors, context);
|
||||
// The step execution mode has no concept of first running.
|
||||
first_running_ = (strategy_ == GraphExecutionStrategy::kStep) ? true : false;
|
||||
}
|
||||
|
||||
if (strategy_ == GraphExecutionStrategy::kPipeline) {
|
||||
PrepareDataForHostTensorQueue(input_tensors, context);
|
||||
} else if (strategy_ == GraphExecutionStrategy::kStep) {
|
||||
PrepareDataForStepMode(input_tensors, context);
|
||||
}
|
||||
}
|
||||
|
||||
// Allocate continuous memory and send output to trigger the step running.
|
||||
if (continuous_memory_alloc_list_list_.size() > 0) {
|
||||
|
|
|
@ -45,7 +45,6 @@ class DataPrepareActor : public MemoryAwareActor {
|
|||
strategy_(GraphExecutionStrategy::kPipeline),
|
||||
host_data_source_actor_(host_data_source_actor),
|
||||
host_tensor_queue_(host_tensor_queue),
|
||||
first_running_(true),
|
||||
loop_count_aid_(nullptr) {}
|
||||
~DataPrepareActor() override = default;
|
||||
|
||||
|
@ -98,7 +97,6 @@ class DataPrepareActor : public MemoryAwareActor {
|
|||
GraphExecutionStrategy strategy_;
|
||||
HostQueueDSActorPtr host_data_source_actor_;
|
||||
HostTensorQueuePtr host_tensor_queue_;
|
||||
bool first_running_;
|
||||
|
||||
// The output controls contain the data source actors and the no input kernel actors.
|
||||
std::vector<AID> data_source_aids_;
|
||||
|
|
Loading…
Reference in New Issue