shared to unique

This commit is contained in:
Alexander Kozhikhov 2019-05-31 18:53:31 +03:00
parent 73c07cb9d5
commit da8d49a67a
2 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ namespace
UInt32 batch_size = 1;
std::string weights_updater_name = "\'SGD\'";
std::shared_ptr<IGradientComputer> gradient_computer;
std::unique_ptr<IGradientComputer> gradient_computer;
if (!parameters.empty())
{
@ -75,11 +75,11 @@ namespace
if (std::is_same<Method, FuncLinearRegression>::value)
{
gradient_computer = std::make_shared<LinearRegression>();
gradient_computer = std::make_unique<LinearRegression>();
}
else if (std::is_same<Method, FuncLogisticRegression>::value)
{
gradient_computer = std::make_shared<LogisticRegression>();
gradient_computer = std::make_unique<LogisticRegression>();
}
else
{

View File

@ -255,7 +255,7 @@ public:
explicit AggregateFunctionMLMethod(
UInt32 param_num,
std::shared_ptr<IGradientComputer> gradient_computer,
std::unique_ptr<IGradientComputer> gradient_computer,
std::string weights_updater_name,
Float64 learning_rate,
Float64 l2_reg_coef,