How can i change conv_depth of a ner model for training

Hi Ines,

I would like to train NER with +-8 tokens around it which is by default 4. I have changed it in en_core_web_md/ner model cfg to look like:

{
"beam_width":1,
"beam_density":0.0,
"beam_update_prob":1.0,
"cnn_maxout_pieces":3,
"nr_class":74,
"hidden_depth":1,
"token_vector_width":96,
"hidden_width":64,
"maxout_pieces":2,
"pretrained_vectors":"en_core_web_md.vectors",
"bilstm_depth":0,
"conv_depth":8,
}

So sould i just run prodigy ner train receipe on this model to get 8 token size or will i need some other settings too?

Other thing what is "conv_window" used for?

Hi Sahil,

If you simply change the config like that, the model won't load correctly, as the weights won't be valid for the model architecture.

You can't change the depth of an already trained model --- you'll have to train from scratch to do that. In v2 these settings are all fairly buried, they're exposed much better in the upcoming v3. You can try changing the depth using the conv_depth environment variable prior to training, or with the spacy pretrain command.

One reason these settings aren't exposed very well in v2 is that tuning them actually doesn't help very much. You're unlikely to see much accuracy improvement from changing the convolution depth, or at least I haven't seen much improvement from it in my own experiments.

The conv_window setting changes how many words on either side each convolution layer processes. The default of 1 has been better on every problem I've tried it on.