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
chenpangpang
transformers
Commits
02e8cd55
"ml/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "6600bd7d91deb07bec5832790168870c3180ccae"
Unverified
Commit
02e8cd55
authored
Aug 26, 2020
by
Julien Plu
Committed by
GitHub
Aug 26, 2020
Browse files
Fix optimizer (#6717)
parent
77abd1e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/optimization_tf.py
src/transformers/optimization_tf.py
+2
-2
No files found.
src/transformers/optimization_tf.py
View file @
02e8cd55
...
@@ -221,9 +221,9 @@ class AdamWeightDecay(tf.keras.optimizers.Adam):
...
@@ -221,9 +221,9 @@ class AdamWeightDecay(tf.keras.optimizers.Adam):
)
)
return
tf
.
no_op
()
return
tf
.
no_op
()
def
apply_gradients
(
self
,
grads_and_vars
,
name
=
None
):
def
apply_gradients
(
self
,
grads_and_vars
,
name
=
None
,
**
kwargs
):
grads
,
tvars
=
list
(
zip
(
*
grads_and_vars
))
grads
,
tvars
=
list
(
zip
(
*
grads_and_vars
))
return
super
(
AdamWeightDecay
,
self
).
apply_gradients
(
zip
(
grads
,
tvars
),
name
=
name
,)
return
super
(
AdamWeightDecay
,
self
).
apply_gradients
(
zip
(
grads
,
tvars
),
name
=
name
,
**
kwargs
)
def
_get_lr
(
self
,
var_device
,
var_dtype
,
apply_state
):
def
_get_lr
(
self
,
var_device
,
var_dtype
,
apply_state
):
"""Retrieves the learning rate with the given state."""
"""Retrieves the learning rate with the given state."""
...
...
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