Skip to content

Instantly share code, notes, and snippets.

@standy66
Created October 22, 2016 20:46
Show Gist options
  • Save standy66/9702a31f67e0d30b18aefb9ff6ed26f8 to your computer and use it in GitHub Desktop.
Save standy66/9702a31f67e0d30b18aefb9ff6ed26f8 to your computer and use it in GitHub Desktop.
with g.as_default():
print([v.name for v in tf.all_variables()])
W = [v for v in tf.all_variables() if v.name == "Conv/weights:0"][0]
W_val = sess.run(W)
fig, axes = plt.subplots(5, 5, figsize=(15, 15))
for i in range(5):
for j in range(5):
axes[i, j].imshow(W_val[:, :, 0, i * 5 + j], interpolation='nearest', cmap='gray')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment