mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 03:01:07 +06:00
fix
This commit is contained in:
parent
dc123e71ef
commit
37a1cb35b8
@ -642,12 +642,7 @@ class CLIPEncoder(nn.Module):
|
|||||||
def __init__(self, config: CLIPConfig, attn_implementation="eager"):
|
def __init__(self, config: CLIPConfig, attn_implementation="eager"):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.config = config
|
self.config = config
|
||||||
self.layers = nn.ModuleList(
|
self.layers = nn.ModuleList([CLIPEncoderLayer(config) for _ in range(config.num_hidden_layers)])
|
||||||
[
|
|
||||||
CLIPEncoderLayer(config, attn_implementation=attn_implementation)
|
|
||||||
for _ in range(config.num_hidden_layers)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
self.gradient_checkpointing = False
|
self.gradient_checkpointing = False
|
||||||
|
|
||||||
def forward(
|
def forward(
|
||||||
|
Loading…
Reference in New Issue
Block a user