dcgan_code
dcgan_code copied to clipboard
A small question regarding conv_cond_concat
Hi, recently I've been studying your code, especially on the conditional DCGAN you made for MNIST dataset.
I see that you concatenated the condition on every layer right after BatchNorm and ReLu, but I still get puzzled with the conv_cond_concat
function that you use to concat the condition into hidden layer. On some layer, you simply use T.concatenate
to join them, but on the other layer, you join them using conv_cond_concat
function as described below
def conv_cond_concat(x, y):
"""
concatenate conditioning vector on feature map axis
"""
return T.concatenate([x, y*T.ones((x.shape[0], y.shape[1], x.shape[2], x.shape[3]))], axis=1)
My questions are,
- why using this function, instead of simple
T.concatenate
? - judging from reshaping of
y
, I assume you are depth-concatenating it. Am I correct?