def forward_and_jacobian(self, x, sum_log_det_jacobians, z):
xs = int_shape(x)
assert xs[1] % 2 == 0 and xs[2] % 2 == 0
y = tf.space_to_depth(x, 2)
if z is not None:
z = tf.space_to_depth(z, 2)
return y,sum_log_det_jacobians, z
评论列表
文章目录