Warnung erhalten: Sie sollten dieses Modell wahrscheinlich bei einer nachgelagerten Aufgabe trainieren, um es für Vorher
Posted: 14 Apr 2025, 01:01
Ich erhalte diese Nachricht beim Laden eines Finetune -Modells von Bert mit einem vorwärts neuronalen Networt auf der letzten Ebene aus einem Checkpoint -Verzeichnis. < /p>
Code: Select all
This IS expected if you are initializing FlaubertForSequenceClassification fr om the checkpoint of a model trained on another task or with another architectu re (e.g. initializing a BertForSequenceClassification model from a BertForPreTr aining model).
- This IS NOT expected if you are initializing FlaubertForSequenceClassificatio n from the checkpoint of a model that you expect to be exactly identical (initi alizing a BertForSequenceClassification model from a BertForSequenceClassificat ion model).
Some weights of FlaubertForSequenceClassification were not initialized from the model checkpoint at /gpfswork/rech/kpf/umg16uw/results_hf/sm/checkpoint-10 and are newly initialized: ['sequence_summary.summary.weight', 'sequence_summary.s ummary.bias']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
< /code>
Eigentlich das Modell, das bereits in einem riesigen Datensatz trainiert wurde, und ich habe es geladen, um Inferenz auf neuem Datensatz durchzuführen. < /p>
model = XXXForSequenceClassification.from_pretrained(modelForClass, num_labels=3)
test_file = '/g/012.xml'
modelForClass = '/g/checkpoint-10'
test = preprare_data(PRE_TRAINED_MODEL_NAME, test_file)
pred = predict(test, test_model)
< /code>
***** Running Prediction *****
Num examples = 5
Batch size = 8
0%| | 0/1 [00:00