dcgan_code icon indicating copy to clipboard operation
dcgan_code copied to clipboard

A small question regarding conv_cond_concat

Open miqbal23 opened this issue 6 years ago • 0 comments

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?

miqbal23 avatar Aug 27 '18 14:08 miqbal23