self-attention-gan icon indicating copy to clipboard operation
self-attention-gan copied to clipboard

Possible error in reshape?

Open aravindsrinivas opened this issue 6 years ago • 0 comments

https://github.com/brain-research/self-attention-gan/blob/ad9612e60f6ba2b5ad3d3340ebae60f724636d75/non_local.py#L77

Is there a mistake in the reshape operation linked above? Shouldn't it be

attn_g = tf.reshape(attn_g, [batch_size, h // 2, w // 2, num_channels // 2])
attn_g = tf.depth_to_space(attn_g, [batch_size, h, w, num_channels // 8])
attn_g = sn_conv1x1(attn_g, num_channels, update_collection, init, 'sn_conv_attn')

instead of attn_g = tf.reshape(attn_g, [batch_size, h, w, num_channels // 2])?

aravindsrinivas avatar Oct 28 '18 23:10 aravindsrinivas