Skip to content

Can't load saved model #4

@timvieira

Description

@timvieira

I'm having trouble loading the trained model that ships with the repo.

$ python src/main.py --test data/23.auto.clean --vocab data/vocab.json --model data/model
   ...
Loaded test trees from data/23.auto.clean
Traceback (most recent call last):
  File "src/main.py", line 179, in <module>
    network = Network.load(args.model)
  File "span-parser-master/src/network.py", line 384, in load
    network.model.load(filename)
AttributeError: '_dynet.ParameterCollection' object has no attribute 'load'

According to this issue, dynet has dropped the Model class in favor of ParameterCollection. This matches the documentation on loading and saving models.

I tried patching it myself, but I'm not sure if data/model might need to be regenerated or something like that...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions