optimizer_factory.h 1.1 KB
Newer Older
B
Bo Zhou 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
//   Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

B
Bo Zhou 已提交
15 16
#ifndef EVO_KIT_OPTIMIZER_FACTORY_H
#define EVO_KIT_OPTIMIZER_FACTORY_H
B
Bo Zhou 已提交
17 18

#include <algorithm>
19
#include <glog/logging.h>
B
Bo Zhou 已提交
20 21 22 23 24
#include <memory>
#include "evo_kit/adam_optimizer.h"
#include "evo_kit/evo_kit.pb.h"
#include "evo_kit/optimizer.h"
#include "evo_kit/sgd_optimizer.h"
B
Bo Zhou 已提交
25

B
Bo Zhou 已提交
26
namespace evo_kit {
B
Bo Zhou 已提交
27
/* @brief: create an optimizer according to the configuration"
28
 * @args:
B
Bo Zhou 已提交
29
 *    config: configuration for the optimizer
30
 *
B
Bo Zhou 已提交
31 32 33
 */
std::shared_ptr<Optimizer> create_optimizer(const OptimizerConfig& optimizer_config);

B
Bo Zhou 已提交
34
} // namespace
B
Bo Zhou 已提交
35 36

#endif