Storing tensorflow models in memory

后端 未结 1 1387
日久生厌
日久生厌 2021-02-18 21:48

The program I\'m writing involves switching between models during run-time.

I am currently using Saver to save/load models from the disk as specified here: https://www.t

相关标签:
1条回答
  • 2021-02-18 22:29

    I would just have two different sessions with their own computation graphs. Alternatively, you could just duplicate the computation graph (two copies of the variables, operations, etc) in the same session. Then you would call sess.run(comp1 if useCompOne else comp2), however you'd like to set it up.

    0 讨论(0)
提交回复
热议问题