I have pretrained weights that I got from running spacy pretrain
using spacy 2.1.4 that I would like to use in an experiment. I passed the model path to the --init-tok2vec in textcat.batch-train
in prodigy 1.8 but am seeing the following error:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/prodigy/__main__.py", line 380, in <module>
controller = recipe(*args, use_plac=True)
File "cython_src/prodigy/core.pyx", line 212, in prodigy.core.recipe.recipe_decorator.recipe_proxy
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/prodigy/recipes/textcat.py", line 254, in batch_train
loss += model.update(batch, revise=False, drop=dropout)
File "cython_src/prodigy/models/textcat.pyx", line 232, in prodigy.models.textcat.TextClassifier.update
File "cython_src/prodigy/models/textcat.pyx", line 249, in prodigy.models.textcat.TextClassifier._update
File "pipes.pyx", line 933, in spacy.pipeline.pipes.TextCategorizer.update
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/thinc/neural/_classes/feed_forward.py", line 53, in continue_update
gradient = callback(gradient, sgd)
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/thinc/api.py", line 269, in finish_update
d_X = bp_layer(layer.ops.flatten(d_seqs_out, pad=pad), sgd=sgd)
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/thinc/neural/_classes/feed_forward.py", line 53, in continue_update
gradient = callback(gradient, sgd)
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/thinc/api.py", line 354, in uniqued_bwd
d_uniques = bp_Y_uniq(dY_uniq, sgd=sgd)
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/thinc/neural/_classes/feed_forward.py", line 53, in continue_update
gradient = callback(gradient, sgd)
File "ops.pyx", line 100, in thinc.neural.ops.Ops.dropout.wrap_backprop.finish_update
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/thinc/neural/_classes/layernorm.py", line 68, in finish_update
return backprop_child(d_xhat, sgd)
File "/Users/james/Personal/Prodigy/prodigy_venv/lib/python3.7/site-packages/thinc/neural/_classes/maxout.py", line 87, in finish_update
self.d_W += d_W.reshape((self.nO, self.nP, self.nI))
ValueError: cannot reshape array of size 110592 into shape (96,3,480)
Are there other considerations I need to make when pretraining so the weights will work with prodigy?