We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to run keras model on a browser using keras.js , but I got the following error while loading it
Error: [Model] Model configuration does not contain any layer The kera model is
from keras.models import Sequential from keras.layers import Dense, LSTM, InputLayer, Bidirectional, TimeDistributed, Embedding, Activation from keras.optimizers import Adam model = Sequential() model.add(InputLayer(input_shape=(MAX_LENGTH, ))) model.add(Embedding(len(word2index), 128)) model.add(Bidirectional(LSTM(256, return_sequences=True))) model.add(TimeDistributed(Dense(len(tag2index)))) model.add(Activation('softmax')) model.compile(loss='categorical_crossentropy', optimizer=Adam(0.001), metrics=['accuracy', ignore_class_accuracy(0)]) model.summary()
Then I have converted with encoder.py as
python encoder.py model.hdf5 And load it with keras.js as
cconst model= new KerasJS.Model({ filepath: { model: 'model.json', weights: 'model_weights.buf', metadata: 'model_metadata.json' }, gpu: false })
I have tried with keras version 2.2.4 , 2.1.4, 2.2.2, 2.1.5 and 2.1.4 .
Any help would be appreciated.
The text was updated successfully, but these errors were encountered:
2.0.6 version removed this error for me
Sorry, something went wrong.
No branches or pull requests
I tried to run keras model on a browser using keras.js , but I got the following error while loading it
Then I have converted with encoder.py as
I have tried with keras version 2.2.4 , 2.1.4, 2.2.2, 2.1.5 and 2.1.4 .
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: