1

I have trained a CNN and created a tensorflow model file (.ckpt).

I have to implement the forward propagation on a hardware using the trained model and for that I need the updated weights and biases (as I got after the training).

However, the .ckpt file has binary encoding.

How do I convert it to some human readable format so I can read the updated model parameters?

Saad Qureshi
  • 728
  • 2
  • 7
  • 21

1 Answers1

2

Use sess.run to evaluate whatever weight/bias in your model. The result is basically a numpy array, then use numpy.savetxt.

tnq177
  • 583
  • 1
  • 8
  • 19
  • But how do I load the model.cpkt file? – Saad Qureshi Jan 08 '17 at 08:50
  • 1
    @SaadQureshi since there are already a bunch of answers for this question on SO, I suggest read them up, for example: http://stackoverflow.com/questions/33759623/tensorflow-how-to-restore-a-previously-saved-model-python – tnq177 Jan 08 '17 at 09:09