0
votes

I have a 4D tensor of filter/kernel weights (of convolutional layer).
They're being passed to the subsequent operation with shape [5,5,3,32], 32 RGB 5x5 filters.

to collect their values for monitoring/analysis/storage using tf.summary.image I need to reshape this tensor into the shape [32,5,5,3], to then view/store each of the 32 filters as individual images of [5,5,3] is this possible purely using tf.reshape()? or do I need to do multiple tensor transformations?

1

1 Answers

1
votes

You need transpose instead of reshape, tf.transpose(t, (3,0,1,2)) should do what you need (suppose t is your tensor here), which shifts the last axis as the first axis.