Self_Explaining_Structures_Improve_NLP_Models
Self_Explaining_Structures_Improve_NLP_Models copied to clipboard
num_labels not visible in config.json
roberta-base currently has been updated since. Do I just add "num_labels": 5 into the json still?
Also currently running into error involving unable to load weights from pytorch checkpoint when attempting to run your code for training.
Could anyone help? Thanks.
Traceback (most recent call last): File "/Users/t/opt/anaconda3/envs/NLP/lib/python3.7/site-packages/transformers/modeling_utils.py", line 951, in from_pretrained state_dict = torch.load(resolved_archive_file, map_location="cpu") File "/Users/t/opt/anaconda3/envs/NLP/lib/python3.7/site-packages/torch/serialization.py", line 585, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/Users/t/opt/anaconda3/envs/NLP/lib/python3.7/site-packages/torch/serialization.py", line 755, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "trainer.py", line 269, in