Giux22's picture
Create README.md
1d9d9a8 verified
|
raw
history blame
1 kB

image_size = 128 # the generated image resolution train_batch_size = 16 eval_batch_size = 16 # how many images to sample during evaluation num_epochs = 15000 gradient_accumulation_steps = 1 learning_rate = 1e-5 lr_warmup_steps = 500 save_image_epochs = 50 save_model_epochs = 50

block_out_channels=(128, 128, 256, 256, 512, 512), # the number of output channels for each UNet block down_block_types=( "DownBlock2D", # a regular ResNet downsampling block "DownBlock2D", "DownBlock2D", "DownBlock2D", "AttnDownBlock2D", # a ResNet downsampling block with spatial self-attention "DownBlock2D", ),

preprocess = transforms.Compose( [ transforms.Resize((config.image_size, config.image_size)), transforms.RandomRotation(45), transforms.RandomHorizontalFlip(), transforms.RandomVerticalFlip(), transforms.ToTensor(), transforms.Normalize([0.5], [0.5]), ] )