spacy v3 pretrain / static vectors ndim mismatch #7474
adamkgoldfarb
started this conversation in
Help: Best practices
Replies: 1 comment 9 replies
-
Hi Adam, sorry to hear you're running into trouble! I could be mistaken - but I don't think this is due to the Could you share the full config file, and the exact command(s) you ran that led to this error? It might also help to share the full stack trace, as that will have additional clues :-) |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm doing a bit of pretraining before loading up some glove and fasttext vectors for training on CPU. I'm hitting a mismatch when training:
Attempt to change dimension 'nM' for model 'static_vectors' from 300 to 0
I haven't changed the config from pretraining to training, but I did change the attrs from ["ORTH","SHAPE"] to ["NORM","PREFIX","SUFFIX","SHAPE"] to align with the recommendations in the documentation. Not sure if that would have any affect, but since I'm not changing the config I assumed it would be ok from pretraining to training.
Going to move ahead without the pretraining bit but wondering if anything springs to mind for you!
Here are the relevant elements of the config, as far as I can tell (let me know if you need more):
[components.tok2vec.model.embed]
@architectures = "spacy.MultiHashEmbed.v1"
width = ${components.tok2vec.model.encode.width}
attrs = ["NORM","PREFIX","SUFFIX","SHAPE"]
rows = [5000,2500,2500,2500]
include_static_vectors = true
[pretraining]
max_epochs = 1000
dropout = 0.2
n_save_every = null
component = "tok2vec"
layer = ""
corpus = "corpora.pretrain"
[pretraining.batcher]
@batchers = "spacy.batch_by_words.v1"
size = 3000
discard_oversize = false
tolerance = 0.2
get_length = null
[pretraining.objective]
@architectures = "spacy.PretrainCharacters.v1"
maxout_pieces = 3
hidden_size = 300
n_characters = 4
[pretraining.optimizer]
@optimizers = "Adam.v1"
beta1 = 0.9
beta2 = 0.999
L2_is_weight_decay = true
L2 = 0.01
grad_clip = 1.0
use_averages = true
eps = 0.00000001
learn_rate = 0.001
Beta Was this translation helpful? Give feedback.
All reactions