File size: 519 Bytes
5fa1a76 |
1 2 3 4 5 6 7 8 9 10 11 |
However, you can still replace - some or all of - the default model configuration attributes with your own if you'd like: model = DistilBertModel.from_pretrained("distilbert/distilbert-base-uncased", config=my_config) Load your custom configuration attributes into the model: from transformers import TFDistilBertModel my_config = DistilBertConfig.from_pretrained("./your_model_save_path/my_config.json") tf_model = TFDistilBertModel(my_config) This creates a model with random values instead of pretrained weights. |