SE6446 commited on
Commit
8c692c3
1 Parent(s): d39a8f8

Upload model

Browse files
Files changed (1) hide show
  1. 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)