You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and then want to print it or use it as a regular variable, the most common way is to use variable.numpy(). However, this requires enabling eager execution, which can sometimes interfere with the rest of the code (e.g., in libraries that rely on graph mode). I've found a way to do this without enabling eager execution. You can use this command:
optimized_alpha = model.sess.run(alpha)
instead of this:
optimized_alpha = alpha.numpy()
I hope it helps you
If I'm wrong, correct me please!