Fix Adam::merge if right state wasn't initialized.

This commit is contained in:
Nikolai Kochetov 2019-09-11 20:48:42 +03:00
parent 95abc1f910
commit d913e415b8

View File

@ -238,6 +238,10 @@ void Adam::read(ReadBuffer & buf)
void Adam::merge(const IWeightsUpdater & rhs, Float64 frac, Float64 rhs_frac)
{
auto & adam_rhs = static_cast<const Adam &>(rhs);
if (adam_rhs.average_gradient.empty())
return;
if (average_gradient.empty())
{
if (!average_squared_gradient.empty() ||