Closed damianoporta closed 5 years ago
Did you also add the {"conv_depth": 8}
setting to your ner
component? And when you look at the cfg
within /home/nlp/0/ner
, is it included there?
No, do I need to add it manually? I only have added the setting in begin_training
@damianoporta could you try settingos.environ["conv_depth"]="8"
before loading the model?
@alejandrojcastaneira it works!
os.environ['conv_depth'] = "8" nlp = spacy.load('/home/nlp/0')
Now the question is....why?
@ines in ner/cfg there is no conv_depth setting. this is what i see:
{
"beam_width":1,
"beam_density":0.0,
"beam_update_prob":1.0,
"cnn_maxout_pieces":3,
"nr_class":89,
"hidden_depth":1,
"token_vector_width":96,
"hidden_width":64,
"maxout_pieces":2,
"pretrained_vectors":"it_model.vectors",
"bilstm_depth":0
}
why the setting is not saved when i do nlp.to_disk() ?
Did you also add the
{"conv_depth": 8}
setting to yourner
component? And when you look at thecfg
within/home/nlp/0/ner
, is it included there?
@ines i have added: that parameter on ner/cfg and it works. Do i need it somewhere else?
that parameter on ner/cfg and it works. Do i need it somewhere else?
Sorry, I hadn't seen your first reply. Glad it works!
You should only have to add it to the component so it can be serialized/deserialized correctly. You don't have to hack it into the cfg
manually, though – you should also be able to set it when you create the ner
component:
ner = nlp.create_pipe("ner", config={"conv_depth": 8})
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hello, i am training a new NER model with the code:
i only have changed the conv_depth setting as said by @honnibal here: https://github.com/explosion/spaCy/issues/3798
Then, loading the model i get:
What is this problem?
Your Environment