Upload model
Browse files- modeling_vitmix.py +1 -1
modeling_vitmix.py
CHANGED
@@ -188,7 +188,7 @@ class ViTMixModel(PreTrainedModel):
|
|
188 |
mlp_dim = config.mlp_dim,
|
189 |
num_experts = config.num_experts
|
190 |
)
|
191 |
-
def forward(self,tensor):
|
192 |
logits = self.model(tensor)
|
193 |
if labels is not None:
|
194 |
loss = torch.nn.cross_entropy(logits, labels)
|
|
|
188 |
mlp_dim = config.mlp_dim,
|
189 |
num_experts = config.num_experts
|
190 |
)
|
191 |
+
def forward(self,tensor, labels = None):
|
192 |
logits = self.model(tensor)
|
193 |
if labels is not None:
|
194 |
loss = torch.nn.cross_entropy(logits, labels)
|