Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cyril Moineau
aidge_core
Commits
0ed4fae0
Commit
0ed4fae0
authored
1 year ago
by
Maxence Naud
Browse files
Options
Downloads
Patches
Plain Diff
[Add] ConstantLR and StepLR
parent
8de2b659
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/aidge/optimizer/LR/LRSchedulerList.hpp
+34
-0
34 additions, 0 deletions
include/aidge/optimizer/LR/LRSchedulerList.hpp
with
34 additions
and
0 deletions
include/aidge/optimizer/LR/LRSchedulerList.hpp
0 → 100644
+
34
−
0
View file @
0ed4fae0
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#ifndef AIDGE_CORE_OPTIMIZER_LRSCHEDULERSLIST_H_
#define AIDGE_CORE_OPTIMIZER_LRSCHEDULERSLIST_H_
#include
"aidge/optimizer/LR/LRScheduler.hpp"
#include
<cstddef>
// std::size_t
namespace
Aidge
{
LRScheduler
ConstantLR
(
const
float
initialLR
)
{
return
LRScheduler
(
initialLR
);
}
LRScheduler
StepLR
(
const
float
initialLR
,
const
std
::
size_t
stepSize
,
float
gamma
=
0.1
f
)
{
return
LRScheduler
(
initialLR
,
[
stepSize
,
gamma
](
float
val
,
const
std
::
size_t
step
)
{
return
(
step
%
stepSize
==
0
)
?
val
*
gamma
:
val
;
});
}
}
// namespace Aidge
#endif
/* AIDGE_CORE_OPTIMIZER_LRSCHEDULERSLIST_H_ */
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment