Patsorn commited on
remove unused imports
Browse files- code/clip/model.py +1 -5
code/clip/model.py
CHANGED
|
@@ -237,10 +237,6 @@ class VisualTransformer(nn.Module):
|
|
| 237 |
|
| 238 |
return x
|
| 239 |
|
| 240 |
-
|
| 241 |
-
from x_transformers.autoregressive_wrapper import AutoregressiveWrapper
|
| 242 |
-
from x_transformers import ViTransformerWrapper, TransformerWrapper, Encoder, Decoder
|
| 243 |
-
|
| 244 |
class CLIP(nn.Module):
|
| 245 |
def __init__(self,
|
| 246 |
embed_dim: int,
|
|
@@ -503,4 +499,4 @@ def build_model(state_dict: dict, weight_sharing: bool, feature_fusion: str, num
|
|
| 503 |
convert_weights(model)
|
| 504 |
#TODO: only do strict=false when loading from state with 'visual2' branch
|
| 505 |
model.load_state_dict(state_dict, strict=False)
|
| 506 |
-
return model.eval()
|
|
|
|
| 237 |
|
| 238 |
return x
|
| 239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
class CLIP(nn.Module):
|
| 241 |
def __init__(self,
|
| 242 |
embed_dim: int,
|
|
|
|
| 499 |
convert_weights(model)
|
| 500 |
#TODO: only do strict=false when loading from state with 'visual2' branch
|
| 501 |
model.load_state_dict(state_dict, strict=False)
|
| 502 |
+
return model.eval()
|