Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
0770ce6c
Unverified
Commit
0770ce6c
authored
Aug 25, 2023
by
Sanchit Gandhi
Committed by
GitHub
Aug 25, 2023
Browse files
[CLAP] Fix logit scales dtype for fp16 (#25754)
parent
494e96d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/models/clap/modeling_clap.py
src/transformers/models/clap/modeling_clap.py
+2
-2
No files found.
src/transformers/models/clap/modeling_clap.py
View file @
0770ce6c
...
@@ -1955,8 +1955,8 @@ class ClapModel(ClapPreTrainedModel):
...
@@ -1955,8 +1955,8 @@ class ClapModel(ClapPreTrainedModel):
text_config
=
config
.
text_config
text_config
=
config
.
text_config
audio_config
=
config
.
audio_config
audio_config
=
config
.
audio_config
self
.
logit_scale_a
=
nn
.
Parameter
(
torch
.
log
(
torch
.
tensor
(
config
.
logit_scale_init_value
)))
self
.
logit_scale_a
=
nn
.
Parameter
(
torch
.
tensor
(
math
.
log
(
config
.
logit_scale_init_value
)))
self
.
logit_scale_t
=
nn
.
Parameter
(
torch
.
log
(
torch
.
tensor
(
config
.
logit_scale_init_value
)))
self
.
logit_scale_t
=
nn
.
Parameter
(
torch
.
tensor
(
math
.
log
(
config
.
logit_scale_init_value
)))
self
.
projection_dim
=
config
.
projection_dim
self
.
projection_dim
=
config
.
projection_dim
...
...
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