Upload modeling_moment.py
Browse files- modeling_moment.py +1 -1
modeling_moment.py
CHANGED
@@ -456,7 +456,7 @@ class MomentEmbeddingModel(MomentPreTrainedModel):
|
|
456 |
# For Mists model
|
457 |
# [batch_size, n_channels x n_patches, d_model]
|
458 |
# hidden_states = enc_out.reshape(batch_size, n_channels * n_patches, self.config.d_model)
|
459 |
-
hidden_states = hidden_states.reshape(
|
460 |
|
461 |
if reduction == "mean":
|
462 |
enc_out = enc_out.mean(dim=1, keepdim=False) # Mean across channels
|
|
|
456 |
# For Mists model
|
457 |
# [batch_size, n_channels x n_patches, d_model]
|
458 |
# hidden_states = enc_out.reshape(batch_size, n_channels * n_patches, self.config.d_model)
|
459 |
+
hidden_states = hidden_states.reshape(-1, n_channels * n_patches, self.config.d_model)
|
460 |
|
461 |
if reduction == "mean":
|
462 |
enc_out = enc_out.mean(dim=1, keepdim=False) # Mean across channels
|