Terminate called after throwing an instance of 'std::bad_alloc'
danmincu opened this issue · comments
Dan Mincu commented
I followed the installation instructions to the dot - including the torch problem described in the first issue but I get the following error when running regardless of the checkpoint issue
python /home/dan/ewiser/bin/annotate.py -c /home/dan/ewiser/res/downloaded/ewiser.semcor_base.pt test.txt
......
2022-07-13 11:58:22 | INFO | pytorch_pretrained_bert.modeling | Model config {
"attention_probs_dropout_prob": 0.1,
"directionality": "bidi",
"hidden_act": "gelu",
"hidden_dropout_prob": 0.1,
"hidden_size": 1024,
"initializer_range": 0.02,
"intermediate_size": 4096,
"max_position_embeddings": 512,
"num_attention_heads": 16,
"num_hidden_layers": 24,
"pooler_fc_size": 768,
"pooler_num_attention_heads": 12,
"pooler_num_fc_layers": 3,
"pooler_size_per_head": 128,
"pooler_type": "first_token_transform",
"type_vocab_size": 2,
"vocab_size": 28996
}
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
Any ideas?
Dan Mincu commented
Answering my own question: I had a mismatched version of torch; following is the winning combination
pytorch-pretrained-bert 0.6.2
torch 1.6.0
torch-scatter 2.0.6
torch-sparse 0.6.9
torchaudio 0.12.0
torchvision 0.7.0