1 | /** |
2 | * Copyright (c) Glow Contributors. See CONTRIBUTORS file. |
3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. |
6 | * You may obtain a copy of the License at |
7 | * |
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
9 | * |
10 | * Unless required by applicable law or agreed to in writing, software |
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. |
15 | */ |
16 | #ifndef GLOW_BASE_TRAIN_H |
17 | #define GLOW_BASE_TRAIN_H |
18 | |
19 | #include "glow/Base/Tensor.h" |
20 | |
21 | #include <cstddef> |
22 | #include <cstdint> |
23 | #include <unordered_map> |
24 | |
25 | namespace glow { |
26 | |
27 | class Tensor; |
28 | |
29 | /// This is a list of parameters that the network trainers (such as sgd and |
30 | /// adam) use for training the network. |
31 | struct TrainingConfig { |
32 | float L1Decay{0}; |
33 | float L2Decay{0}; |
34 | float learningRate{0.01f}; |
35 | float momentum{0.0}; |
36 | unsigned batchSize{1}; |
37 | }; |
38 | |
39 | } // namespace glow |
40 | |
41 | #endif // GLOW_BASE_TRAIN_H |
42 | |