File size: 304 Bytes
2468337 |
1 2 3 4 5 6 7 8 9 10 11 |
import torch
from transformers import BertModel
from .configuration import NewModelConfig
class NewModel(BertModel):
config_class = NewModelConfig
def __init__(self, config):
super().__init__(config)
self.last_layer = torch.nn.Linear(config.hidden_size, config.new_hidden_size) |