Shared
Functions
Item
PyTorch
TensorFlow
Others
Comprehension
Softmax
class BertClassification(nn.Module):
def __init__(self, config):
super().__init__()
self.config = config
self.bert = BertModel(config)
self.dense = torch.nn.Linear(config.hidden_size, config.num_labels) # FC layer
self.pred = torch.nn.Softmax(dim=-1) # magnify by softmaxLoss
What it really does
NLL & CrossEntropy
Accuracy
Categorical Accuracy
Alignment
Model
Last updated
