Commit 03add24b authored by Karel Vesely's avatar Karel Vesely
Browse files

trunk,nnet: changing setting nnet weights from supervector, so the code compiles with older g++



git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@2776 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent aee2f879
......@@ -190,9 +190,15 @@ void Nnet::SetWeights(const Vector<BaseFloat>& wei_src) {
//copy the data to CuMatrix/CuVector and assign to the component
//weights
aff_t->SetLinearity(CuMatrix<BaseFloat>(mat));
{
CuMatrix<BaseFloat> tmp(mat);
aff_t->SetLinearity(tmp);
}
//bias
aff_t->SetBias(CuVector<BaseFloat>(vec));
{
CuVector<BaseFloat> tmp(vec);
aff_t->SetBias(tmp);
}
} break;
default :
KALDI_ERR << "Unimplemented access to parameters "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment