提交 9322f8cb 编写于 作者: H hedaoyuan

Format

上级 b1c22b67
......@@ -358,6 +358,7 @@ void MultiGradientMachine::getOutArgs(std::vector<Argument>* outArgs,
REGISTER_TIMER("waitOutArgs");
thread->waitOutArgsReady();
}
// outArgs_.size() only need to be calculated once.
static int size = threads_[threads_.size() - 1]->getOutArgs().size();
outArgs_.resize(size);
......@@ -574,9 +575,9 @@ void TrainerThread::forward() {
REGISTER_TIMER("thread_forward");
if (batchSize_ > 0) {
gradientMachine_->forward(
inArgs_, &outArgs_, multiMachine_->getPassType());
inArgs_, &outArgs_, multiMachine_->getPassType());
} else {
outArgs_.clear();
outArgs_.clear();
}
}
outArgsReadySem_.post();
......
......@@ -470,7 +470,6 @@ protected:
/// indicate whether inArgs is copied before forward()
bool inArgsCopied_;
int batchSize_;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册