constructor changes change

This commit is contained in:
alexander kozhikhov 2019-02-13 00:18:27 +03:00
parent aedf4925dc
commit 6a8542c8f6
4 changed files with 13 additions and 8 deletions

View File

@ -73,7 +73,7 @@ AggregateFunctionPtr createAggregateFunctionMLMethod(
if (argument_types.size() < 2)
throw Exception("Aggregate function " + name + " requires at least two arguments", ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
return std::make_shared<Method>(argument_types.size() - 1, gc, wu, learning_rate, batch_size);
return std::make_shared<Method>(argument_types.size() - 1, gc, wu, learning_rate, batch_size, argument_types, parameters);
}
}

View File

@ -375,8 +375,11 @@ public:
std::shared_ptr<IGradientComputer> gradient_computer,
std::shared_ptr<IWeightsUpdater> weights_updater,
Float64 learning_rate,
UInt32 batch_size)
: param_num(param_num),
UInt32 batch_size,
const DataTypes & argument_types,
const Array & params)
: IAggregateFunctionDataHelper<Data, AggregateFunctionMLMethod<Data, Name>>(argument_types, params),
param_num(param_num),
learning_rate(learning_rate),
batch_size(batch_size),
gc(std::move(gradient_computer)),