2 * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __ONERT_COMPILER_TRAIN_TRAINING_INFO_H__
18 #define __ONERT_COMPILER_TRAIN_TRAINING_INFO_H__
21 #include "exec/train/optimizer/OptimizerCode.h"
22 #include "ir/operation/Loss.h"
33 ir::operation::Loss::Type type;
34 // TODO Add members for loss
39 exec::train::optimizer::OptimizerCode optim_code;
41 // TODO Add properties
48 TrainingInfo(const TrainingInfo &obj) = default;
49 TrainingInfo(TrainingInfo &&) = default;
50 TrainingInfo &operator=(const TrainingInfo &) = default;
51 TrainingInfo &operator=(TrainingInfo &&) = default;
52 ~TrainingInfo() = default;
54 uint32_t batchSize() const { return _batch_size; }
55 void setBatchSize(const uint32_t batch_size) { _batch_size = batch_size; }
56 const LossInfo &lossInfo() const { return _loss_info; }
57 void setLossInfo(const LossInfo &loss_info) { _loss_info = loss_info; }
58 const OptimizerInfo &optimizerInfo() const { return _optimizer_info; }
59 void setOptimizerInfo(const OptimizerInfo &optimizer_info) { _optimizer_info = optimizer_info; }
63 OptimizerInfo _optimizer_info;
68 } // namespace compiler
71 #endif // __ONERT_COMPILER_TRAIN_TRAINING_INFO_H__