runname = 'synthetic_loaddot191_Adam1' device = 1 cuda0 = torch.device(f'cuda:{device}') batch_size = 4 epochs = 200 in_channels = 191 if in_channels == 2: inputtype = 'V1_V4' if in_channels == 191: inputtype = 'all_channels' # ----- # Model, loss, & optimizer # ----- model = model_file.ResblocksDeconv(in_channels, (240, 240)) if __name__ == '__main__': if device >= 0: model.cuda(device) # lossFunction = module.LossFunction(device) lossFunction = module.VGGLoss(device) optimizer = optim.Adam(model.parameters(), 0.1) hori_means, verti_means, std_avg = RF.extract_means_std() # ----- # Inputs: # Will be dot number times the gaus # ------
cuda0 = torch.device(f'cuda:{device}') batch_size = 64 all_image_size = 96 num_epochs = 500 lr = 0.0002 # Beta1 hyperparam for Adam optimizers beta1 = 0.8 vgg_beta = 2 # ----- # Models # ----- in_channels=191 netG = model_file.ResblocksDeconv(in_channels, (all_image_size,all_image_size)) # netG.apply(module.weights_init) netG.load_state_dict(torch.load(f'{old_runname}/netG_epochs_{epoch_loaded}.model')) netD = module.Discriminator().to(device) netD.load_state_dict(torch.load(f'{old_runname}/netD_epochs_{epoch_loaded}.model', map_location='cpu')) # netD.apply(module.weights_init) if __name__ == '__main__': if device >= 0: netG.cuda(device) netD.cuda(device)