We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I find there is no softmax function when I should get the distribution of prediction.
wrapper.py def mlm_train_step(self, labeled_batch: Dict[str, torch.Tensor], unlabeled_batch: Optional[Dict[str, torch.Tensor]] = None, lm_training: bool = False, alpha: float = 0, **_) -> torch.Tensor: """Perform a MLM training step."""
inputs = self.generate_default_inputs(labeled_batch) mlm_labels, labels = labeled_batch['mlm_labels'], labeled_batch['labels'] outputs = self.model(**inputs) prediction_scores = self.preprocessor.pvp.convert_mlm_logits_to_cls_logits(mlm_labels, outputs[0]) loss = nn.CrossEntropyLoss()(prediction_scores.view(-1, len(self.config.label_list)), labels.view(-1))
the prediction_scores is not applied to the softmax
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I find there is no softmax function when I should get the distribution of prediction.
wrapper.py
def mlm_train_step(self, labeled_batch: Dict[str, torch.Tensor],
unlabeled_batch: Optional[Dict[str, torch.Tensor]] = None, lm_training: bool = False,
alpha: float = 0, **_) -> torch.Tensor:
"""Perform a MLM training step."""
the prediction_scores is not applied to the softmax
The text was updated successfully, but these errors were encountered: