I am facing problems with saving the training weight (W) for MNIST tensorflow example as described here. MNIST tensorflow. If my understanding is correct, we need the training weight in future for other testing cases (not the MNIST testing case). I tried print W.eval() to get the weight; but it happens to provide me with a zero matrix of 784x10. How can I get the weights in an array form or in .csv format (not .cpkt)?
I've done something similar like so:
weight_values = session.run(W)
numpy.savetxt("myfilename.csv", weight_values, delimiter=",")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With