Skip to content

Commit 3cebe6f

Browse files
authored
Update Network.cpp
1 parent 4da2a62 commit 3cebe6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SLIDE/Network.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ int Network::ProcessInput(int **inputIndices, float **inputValues, int *lengths,
247247
tmp->_adamAvgVelbias = BETA2 * tmp->_adamAvgVelbias + (1 - BETA2) * tmp->_tbias * tmp->_tbias;
248248
tmp->_bias += ratio*tmplr * tmp->_adamAvgMombias / (sqrt(tmp->_adamAvgVelbias) + EPS);
249249
tmp->_tbias = 0;
250+
std::copy(local_weights, local_weights + dim, tmp->_weights);
250251
}
251252
else
252253
{
@@ -273,7 +274,7 @@ int Network::ProcessInput(int **inputIndices, float **inputValues, int *lengths,
273274
delete[] bucketIndices;
274275
}
275276

276-
std::copy(local_weights, local_weights + dim, tmp->_weights);
277+
277278
delete[] local_weights;
278279
}
279280
}

0 commit comments

Comments
 (0)