-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
  • 7,706
  • 14
  • 53
  • 95

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
  • 199,541
  • 138
  • 677
  • 738