MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / visualize_conv1_weights

Function visualize_conv1_weights

examples/ImageNetModels/alexnet.py:18–26  ·  view source on GitHub ↗
(filters)

Source from the content-addressed store, hash-verified

16
17
18def visualize_conv1_weights(filters):
19 ctx = get_current_tower_context()
20 if not ctx.is_main_training_tower:
21 return
22 with tf.name_scope('visualize_conv1'):
23 filters = tf.reshape(filters, [11, 11, 3, 8, 12])
24 filters = tf.transpose(filters, [3, 0, 4, 1, 2]) # 8,11,12,11,3
25 filters = tf.reshape(filters, [1, 88, 132, 3])
26 tf.summary.image('visualize_conv1', filters, max_outputs=1, collections=['AAA'])
27
28
29class Model(ImageNetModel):

Callers 1

get_logitsMethod · 0.85

Calls 1

Tested by

no test coverage detected