Closed ahmed-fau closed 4 years ago
Yes, the input to general.lossfun() adaptive.lossfun() must be a 2d matrix, of size [num_batches, num_dims]. It sounds like in your case, you should reshape to "channels * sequence or map" and set self.num_dims to that as well.
Hi,
Thanks for sharing this nice work. I am trying to use the adaptive loss for regularizing my conditional GAN model instead of using the L1 norm. However, I cannot get reliable performance.
I think the description of the dimensionality of the residual input
x
is a bit unclear. What I have understood is: the input to the functionlossfun
should be a 2d matrix with number of rows equals the batch size and number of columns equals the flattened feature map, so that if I have a tensor of dimensionality[batch,channel,squence or map]
then I should reshape it to be[batch, channels * sequence or map]
... is this correct?If so, does this mean that the member variable
self.num_dims
should also equalchannels * sequence or map
?Many thanks in advance