You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
The form below must be filled out.
System information
Windows 10
Tensorflow 1.13/Keras 2.2.3
Python 3.7
Describe the problem
I am facing two problems
While saving the BiLSTM-CRF model, the weights and the preprocessor files are being saved but not the params file.
While testing, I am getting the error "AttributeError: type object 'BiLSTMCRF' has no attribute 'load'"
Source code / logs
from anago.tagger import Tagger
from anago.models import BiLSTMCRF
from anago.preprocessing import IndexTransformer
from pprint import pprint
def main():
print('loading objects')
model = BiLSTMCRF.load("weights.h5", "params.json")
it = IndexTransformer.load("preprocessor.json")
tagger = Tagger(model, preprocessor=it)
print('tagging a sentence')
res = tagger.analyze("EU rejects German call to boycott British lamb .")
pprint(res)
if __name__ == main():
main()
ERROR
Traceback (most recent call last):
File "C:/Users/soumil/PycharmProjects/code_switching/test.py", line 17, in
if name == main():
File "C:/Users/lab/PycharmProjects/code_switching/test.py", line 9, in main
model = BiLSTMCRF.load("weights.h5", "params.json")
AttributeError: type object 'BiLSTMCRF' has no attribute 'load'
The text was updated successfully, but these errors were encountered:
If you open a GitHub issue, here is our policy:
System information
Describe the problem
I am facing two problems
Source code / logs
ERROR
Traceback (most recent call last):
File "C:/Users/soumil/PycharmProjects/code_switching/test.py", line 17, in
if name == main():
File "C:/Users/lab/PycharmProjects/code_switching/test.py", line 9, in main
model = BiLSTMCRF.load("weights.h5", "params.json")
AttributeError: type object 'BiLSTMCRF' has no attribute 'load'
The text was updated successfully, but these errors were encountered: