Skip to content

报错 #4

Open
Open
@ZXB1020

Description

@ZXB1020

Some weights of the model checkpoint at ../model_hub/bert-base-chinese/ were not used when initializing BertModel: ['cls.predictions.transform.dense.bias', 'cls.predictions.
transform.LayerNorm.weight', 'cls.predictions.transform.dense.weight', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'cls.pre
dictions.bias', 'cls.predictions.transform.LayerNorm.bias']

  • This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequence
    Classification model from a BertForPreTraining model).
  • This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification
    File "C:\Users\zj156\PycharmProjects\Model1\venv\lib\site-packages\torch\nn\modules\module.py", line 579, in _apply
    module._apply(fn)
    File "C:\Users\zj156\PycharmProjects\Model1\venv\lib\site-packages\torch\nn\modules\module.py", line 579, in _apply
    module._apply(fn)
    File "C:\Users\zj156\PycharmProjects\Model1\venv\lib\site-packages\torch\nn\modules\module.py", line 602, in apply
    param_applied = fn(param)
    File "C:\Users\zj156\PycharmProjects\Model1\venv\lib\site-packages\torch\nn\modules\module.py", line 925, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
    File "C:\Users\zj156\PycharmProjects\Model1\venv\lib\site-packages\torch\cuda_init
    .py", line 211, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
    AssertionError: Torch not compiled with CUDA enabled
    (venv) PS C:\Users\zj156\Desktop\pytorch_bert_multi_classification-main>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions