Closed costiash closed 1 year ago
Looks like I have managed to find a work around. feels somewhat like weird solution but it worked.
I have added to add_noise
method the following:
def add_noise(self, x , t ):
batch_size,w,h = x.shape[0] , x.shape[1] , x.shape[2]
noise = tf.random.normal((batch_size,w,h,4))
sqrt_alpha_prod = _ALPHAS_CUMPROD[t] ** 0.5
sqrt_one_minus_alpha_prod = (1 - _ALPHAS_CUMPROD[t]) ** 0.5
sqrt_alpha_prod_mul_x = sqrt_alpha_prod * x
sqrt_alpha_prod_mul_x = tf.cast(sqrt_alpha_prod_mul_x, dtype=tf.float32)
sqrt_one_minus_alpha_prod_mul_noise = sqrt_one_minus_alpha_prod * noise
sqrt_one_minus_alpha_prod_mul_noise = tf.cast(sqrt_one_minus_alpha_prod_mul_noise, dtype=tf.float32)
return sqrt_alpha_prod_mul_x + sqrt_one_minus_alpha_prod_mul_noise
Hello, first and foremost, thank you for this fantastic repository and the provided colab demonstrations! When I attempted the GPU Colab + Mixed Precision and tried to send an input image argument to the generator, I received the following error: ` InvalidArgumentError Traceback (most recent call last)