如何在tf.layers.conv2d中访问内核变量? [英] How to access kernel variables in tf.layers.conv2d?
本文介绍了如何在tf.layers.conv2d中访问内核变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想可视化卷积层中的权重以观察它们如何变化。
I want to visualize weights in convolutional layers to watch how they change.
但是我找不到在<$ c $中访问卷积层中权重的方法c> tf.layers.conv2d
谢谢
推荐答案
您可以按名称访问该变量:
You could access that variable by name:
weights = sess.run('<name_of_your_layer>/weights:0', feed_dict=...)
如果您不确定自己的名字变量,通过打印 tf.trainable_variables()
If you're unsure about the name of your variable, see what it could be by printing tf.trainable_variables()
这篇关于如何在tf.layers.conv2d中访问内核变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文