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
ab96bf02
Unverified
Commit
ab96bf02
authored
May 11, 2023
by
raghavanone
Committed by
GitHub
May 11, 2023
Browse files
Add gradient_checkpointing parameter to FlaxWhisperEncoder (#23300)
Add gradient_checkpointing parameter
parent
83eda643
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/transformers/models/whisper/modeling_flax_whisper.py
src/transformers/models/whisper/modeling_flax_whisper.py
+3
-1
No files found.
src/transformers/models/whisper/modeling_flax_whisper.py
View file @
ab96bf02
...
...
@@ -1515,7 +1515,9 @@ class FlaxWhisperForAudioClassificationModule(nn.Module):
gradient_checkpointing
:
bool
=
False
def
setup
(
self
)
->
None
:
self
.
encoder
=
FlaxWhisperEncoder
(
config
=
self
.
config
,
dtype
=
self
.
dtype
)
self
.
encoder
=
FlaxWhisperEncoder
(
config
=
self
.
config
,
dtype
=
self
.
dtype
,
gradient_checkpointing
=
self
.
gradient_checkpointing
)
self
.
config
.
is_encoder_decoder
=
False
num_layers
=
self
.
config
.
num_hidden_layers
+
1
if
self
.
config
.
use_weighted_layer_sum
:
...
...
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