Skip to content

Errors while running spacy with keras example #2743

@romikforest

Description

@romikforest

spacy 2.0.11, python Python 3.6.6 :: Anaconda custom (64-bit), win 10 64 bit

I was trying to run spacy with keras example from documentation, but could not use it as is:
I could not save the spacy model after training.

with (model_dir / 'config.json').open('wb') as file_:
file_.write(lstm.to_json())

had error str can't be saved to binary file (and it doesn't manage directory existence).
Than I can't evalaluate the model.
In rintime spacy loads 'en'. And while training - 'en_vectors_web_lg'
I've tried to load all standard models, standard models and vectors like nlp.vocab.vectors.from_disk('en_vectors_web_lg'). I always have errors:
Tagger is not in model
Wrong vectors shape
TypeError: 'Tagger' object is not iterable

and so on

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesCode examples in /examples

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions