Merge pull request #1 from openai/main

changes
This commit is contained in:
AK391 2021-03-23 00:48:35 -04:00 committed by GitHub
commit b0a985afae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
from collections import OrderedDict
from typing import Tuple, Union
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
@ -287,7 +288,7 @@ class CLIP(nn.Module):
self.ln_final = LayerNorm(transformer_width)
self.text_projection = nn.Parameter(torch.empty(transformer_width, embed_dim))
self.logit_scale = nn.Parameter(torch.ones([]))
self.logit_scale = nn.Parameter(torch.FloatTensor([np.log(1/0.07)]))
self.initialize_parameters()