Tensorflow saves and uses the training model

(1) Save the training model, name the model my_net.ckp, and save it in the net/ folder
         saver = tf.train.Saver()
         with tf.Session() as sess:
             #Save the model
             saver.save(sess,'net/my_net.ckpt')
(2) Call the local model
        saver = tf.train.Saver()
         with tf.Session() as sess:
             # call the model
            saver.restore(sess,'net/my_net.ckpt')


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324647254&siteId=291194637