Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sayakpaul committed May 10, 2024
1 parent dc123e7 commit 37a1cb3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/transformers/models/clip/modeling_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,7 @@ class CLIPEncoder(nn.Module):
def __init__(self, config: CLIPConfig, attn_implementation="eager"):
super().__init__()
self.config = config
self.layers = nn.ModuleList(
[
CLIPEncoderLayer(config, attn_implementation=attn_implementation)
for _ in range(config.num_hidden_layers)
]
)
self.layers = nn.ModuleList([CLIPEncoderLayer(config) for _ in range(config.num_hidden_layers)])
self.gradient_checkpointing = False

def forward(
Expand Down

0 comments on commit 37a1cb3

Please sign in to comment.