Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
eb9a81d7
".github/workflows/auto_compatibility_test.yml" did not exist on "bbbfe9b2c9543d31dcf9dbe7feefa3dadb6574ac"
Commit
eb9a81d7
authored
May 13, 2022
by
bajiaoyu517
Committed by
binmakeswell
May 17, 2022
Browse files
[NFC] polish colossalai/kernel/cuda_native/csrc/cpu_adam.h code style (#945)
parent
8ffdc383
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
colossalai/kernel/cuda_native/csrc/cpu_adam.h
colossalai/kernel/cuda_native/csrc/cpu_adam.h
+19
-13
No files found.
colossalai/kernel/cuda_native/csrc/cpu_adam.h
View file @
eb9a81d7
...
...
@@ -90,12 +90,18 @@ union AVX_Data {
bool grad_half_precision = false, float loss_scale = -1);
class
Adam_Optimizer
{
public:
public:
Adam_Optimizer
(
float
alpha
=
1e-3
,
float
betta1
=
0.9
,
float
betta2
=
0.999
,
float
eps
=
1e-8
,
float
weight_decay
=
0
,
bool
adamw_mode
=
true
)
:
_alpha
(
alpha
),
_betta1
(
betta1
),
_betta2
(
betta2
),
_eps
(
eps
),
_weight_decay
(
weight_decay
),
_betta1_t
(
1.0
),
_betta2_t
(
1.0
),
_step
(
0
),
:
_alpha
(
alpha
),
_betta1
(
betta1
),
_betta2
(
betta2
),
_eps
(
eps
),
_weight_decay
(
weight_decay
),
_betta1_t
(
1.0
),
_betta2_t
(
1.0
),
_step
(
0
),
_adamw_mode
(
adamw_mode
)
{}
~
Adam_Optimizer
()
{}
...
...
@@ -135,7 +141,7 @@ public:
}
}
private:
private:
float
_alpha
;
float
_betta1
;
float
_betta2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment