-1

When using TensorFlow Saver, is there a way to save an ordinary Python variable as well?

If not, what is the best solution when certain Python vars are helpful to save.

SRobertJames
  • 8,210
  • 14
  • 60
  • 107

1 Answers1

1

You can save/restore python variables with pickle.

import pickle

f = open('store.pckl', 'wb')
pickle.dump(your_var, f)
f.close()

f = open('store.pckl', 'rb')
your_var = pickle.load(f)
f.close()
Community
  • 1
  • 1
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753