Spaces:
Sleeping
Sleeping
| RESOLUTIONS = [4, 8, 16, 32, 64, 128, 256] | |
| RES_TO_FILTERS = { | |
| 4: 512, | |
| 8: 512, | |
| 16: 512, | |
| 32: 512, | |
| 64: 256, | |
| 128: 128, | |
| 256: 64, | |
| } | |
| LATENT_DIM = 512 | |
| BATCH_SIZE = 32 | |
| LEARNING_RATE = 1e-4 | |
| def normalize(img): | |
| img = img / 127.5 - 1.0 # Normalize images to [-1,1] | |
| return img | |
| def denormalize(img): | |
| return (img + 1) / 2 | |