You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def _single_style_loss(self, a, g):
###############################
## TO DO
N = a.shape[3]
M = a.shape[1] * a.shape[2]
gram_a = self._gram_matrix(a, N, M)
gram_g = self._gram_matrix(g, N, M)
return tf.reduce_sum((gram_g - gram_a) ** 2) / (4 * (N ** 2) * (M ** 2))
在这里,a是style image的feature representation, g是generated image的feature representation。在计算generated image的格拉姆矩阵时候,调用了 self._gram_matrix(g, N, M)函数,但这里的输入N和M都是style image的数据。这样计算没有问题么?
The text was updated successfully, but these errors were encountered: