![]() join ( directory, filename + '.ckpt' ) self. Train the model using the following command:įrom import freeze_graph def save ( self, directory, filename ): if not os. It was modified from my previous simple CNN model to classify CIFAR10 dataset. This sample code was available on my GitHub. For doing the equivalent tasks in TensorFlow 2.x, please read the other blog post “Save, Load and Inference From TensorFlow 2.x Frozen Graph”. In this blog post, I am going to introduce how to save, load, and run inference for frozen graph in TensorFlow 1.x. While pb format models seem to be important, there is lack of systematic tutorials on how to save, load and do inference on pb format models in TensorFlow. It is widely used in model deployment, such as fast inference tool TensorRT. pb stands for Protocol Buffers, it is a language-neutral, platform-neutral extensible mechanism for serializing structured data. There is another model format called pb which is frequently seen in model zoos but hardly mentioned by TensorFlow official channels. ![]() ![]() You can find a lot of instructions on TensorFlow official tutorials. Loading those saved models are also easy. Now you can either use Keras to save h5 format model or use tf.train.Saver to save the check point files. TensorFlow model saving has become easier than it was in the early days. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |