Skip to content

Commit

Permalink
fixed model loading issue (openai#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
jongwook committed Mar 23, 2021
1 parent 290ac5c commit 8a665a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clip/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def __init__(self,
self.ln_final = LayerNorm(transformer_width)

self.text_projection = nn.Parameter(torch.empty(transformer_width, embed_dim))
self.logit_scale = nn.Parameter(torch.FloatTensor([np.log(1/0.07)]))
self.logit_scale = nn.Parameter(torch.ones([]) * np.log(1 / 0.07))

self.initialize_parameters()

Expand Down

0 comments on commit 8a665a6

Please sign in to comment.