add "residual = None" to forward conv layers
Browse files
model.py
CHANGED
@@ -1134,6 +1134,8 @@ class WhisperEncoder(WhisperPreTrainedModel):
|
|
1134 |
# Process through conv layers
|
1135 |
inputs_embeds = input_features
|
1136 |
for i, conv_layer in enumerate(self.conv_layers):
|
|
|
|
|
1137 |
if self.config.skip_connections and i > 0 and inputs_embeds.shape == conv_layer(inputs_embeds).shape:
|
1138 |
residual = inputs_embeds
|
1139 |
|
|
|
1134 |
# Process through conv layers
|
1135 |
inputs_embeds = input_features
|
1136 |
for i, conv_layer in enumerate(self.conv_layers):
|
1137 |
+
residual = None
|
1138 |
+
|
1139 |
if self.config.skip_connections and i > 0 and inputs_embeds.shape == conv_layer(inputs_embeds).shape:
|
1140 |
residual = inputs_embeds
|
1141 |
|