提交 4c72b063 编写于 作者: W wangmeng28

Fix creation of tmp variable in factorization machine layer

上级 a30d53b7
......@@ -33,10 +33,11 @@ bool FactorizationMachineLayer::init(const LayerMap& layerMap,
/* initialize the latentVectors_ */
CHECK_EQ(inputLayers_.size(), 1UL);
size_t height = inputLayers_[0]->getSize();
CHECK_EQ(parameters_[0]->getSize(), height * factorSize_);
latentVectors_ =
std::unique_ptr<Weight>(new Weight(height, factorSize_, parameters_[0]));
v2_ = latentVectors_->getW()->clone(0, 0, useGpu_);
v2_ = Matrix::create(height, factorSize_, false, useGpu_);
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册