Skip to content

Commit

Permalink
Apply code suggestions
Browse files Browse the repository at this point in the history
ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <[email protected]>
  • Loading branch information
jyoungyun committed Sep 9, 2024
1 parent 3e44e26 commit 3906443
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/onert/core/src/loader/train/CheckpointLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class DataBuffer
DataBufferPair operator[](uint32_t i) const
{
assert(_offset.size() == _size.size());
assert(i <= _offset.size());
assert(i < _offset.size());
return DataBufferPair{_offset[i], _size[i]};
}

Expand Down Expand Up @@ -202,12 +202,12 @@ class CheckpointLoader final
void updateAdamOptimizer(const std::unique_ptr<onert::exec::Execution> &exec)
{
// Adam optimizer has two optimizer variables. (mean, variance)
[[maybe_unused]] constexpr auto ADAM_VARIABLE_COUNT = 2;
[[maybe_unused]] const std::size_t ADAM_VARIABLE_COUNT = 2;

// Reset EOF bit
_file.clear();

auto vindex = 0;
uint32_t vindex = 0;
exec->iterateTrainableTensors([&](const ir::OperandIndex &,
const backend::train::ITrainableTensor *tensor) {
assert(tensor);
Expand Down

0 comments on commit 3906443

Please sign in to comment.