Encode and Decode are back in the superclass. They now handle sentence pairs special tokens.
This commit is contained in:
@@ -23,7 +23,7 @@ import logging
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
from torch.nn import CrossEntropyLoss
|
||||
from torch.nn import CrossEntropyLoss, MSELoss
|
||||
|
||||
from pytorch_transformers.modeling_bert import (BertConfig, BertEmbeddings,
|
||||
BertLayerNorm, BertModel,
|
||||
@@ -144,7 +144,6 @@ class RobertaLMHead(nn.Module):
|
||||
return x
|
||||
|
||||
|
||||
|
||||
class RobertaForSequenceClassification(BertPreTrainedModel):
|
||||
"""
|
||||
Roberta Model with a classifier head on top.
|
||||
|
||||
Reference in New Issue
Block a user