Hironsan / anago

Bidirectional LSTM-CRF and ELMo for Named-Entity Recognition, Part-of-Speech Tagging and so on.
https://anago.herokuapp.com/
MIT License
1.48k stars 368 forks source link

Doesn't save params.json #117

Open tahirahmad2030 opened 5 years ago

tahirahmad2030 commented 5 years ago

I trained a model on NER using training_example.py. The below code in the script didn't save params json.


    model.save(args.weights_file, args.params_file, args.preprocessor_file)
    p.save(args.preprocessor_file)```
parkourcx commented 5 years ago

I have met the same issue, did you fix it?

parkourcx commented 5 years ago

@tahirahmad2030 I have fixed this problem by: model_json = model.to_json() with open(args.params_file,'w') as jf: jf.write(model_json)