save a pretrained model as .pb
Is there a way to export a trained model as .pb file that can be served with tensorflow serving?
hello @mvss80 ! Yes you can use for instance https://github.com/amir-abdi/keras_to_tensorflow which is exactly doing this with one command line.
@kermitt2 thanks for the quick response and pointing me to the utility.
For the ner pretrained models, I can find the .hdf5 file with the weights but cannot find the network architecture .json file or the complete model .h5 files. Could you please let me know how I can export the network architecture so I can then export them both?
EDIT: I exported the model architecture as a .json file and also tried saving the model using model.save() that puts architecture+weights in one file. In both cases, the keras_to_tensorflow utility fails because looks like it doesn't support custom layers.