Set parameters as the one from the main experiment

This commit is contained in:
Paul Corbalan 2024-01-31 11:42:10 +01:00
parent 30679c8173
commit edef9f7633
2 changed files with 12 additions and 10 deletions

View File

@ -20,10 +20,10 @@ import models.mlp as mlp
if __name__=="__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--config', required=True, type=str, help='path to generator config .json file')
parser.add_argument('-w', '--weights', required=True, type=str, help='path to generator weights .pth file')
parser.add_argument('-o', '--output_dir', required=True, type=str, help="path to to output directory")
parser.add_argument('-n', '--nimages', required=True, type=int, help="number of images to generate", default=1)
parser.add_argument('-c', '--config', default='samples/generator_config.json', type=str, help='path to generator config .json file')
parser.add_argument('-w', '--weights', default='samples/netG_epoch_2384.pth', type=str, help='path to generator weights .pth file')
parser.add_argument('-o', '--output_dir', default='data/generated', type=str, help="path to to output directory")
parser.add_argument('-n', '--nimages', default=100, type=int, help="number of images to generate")
parser.add_argument('--cuda', action='store_true', help='enables cuda')
opt = parser.parse_args()

14
main.py
View File

@ -21,15 +21,15 @@ if __name__=="__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--dataset', default='folder', help='cifar10 | lsun | imagenet | folder | lfw ')
parser.add_argument('--dataroot', default='data/maps', help='path to dataset')
parser.add_argument('--dataroot', default='data/faces', help='path to dataset')
parser.add_argument('--workers', type=int, help='number of data loading workers', default=2)
parser.add_argument('--batchSize', type=int, default=64, help='input batch size')
parser.add_argument('--imageSize', type=int, default=256, help='the height / width of the input image to network')
parser.add_argument('--batchSize', type=int, default=2048, help='input batch size')
parser.add_argument('--imageSize', type=int, default=32, help='the height / width of the input image to network')
parser.add_argument('--nc', type=int, default=3, help='input image channels')
parser.add_argument('--nz', type=int, default=100, help='size of the latent z vector')
parser.add_argument('--ngf', type=int, default=64)
parser.add_argument('--ndf', type=int, default=64)
parser.add_argument('--niter', type=int, default=25, help='number of epochs to train for')
parser.add_argument('--ngf', type=int, default=32)
parser.add_argument('--ndf', type=int, default=32)
parser.add_argument('--niter', type=int, default=5000, help='number of epochs to train for')
parser.add_argument('--lrD', type=float, default=0.00005, help='learning rate for Critic, default=0.00005')
parser.add_argument('--lrG', type=float, default=0.00005, help='learning rate for Generator, default=0.00005')
parser.add_argument('--beta1', type=float, default=0.5, help='beta1 for adam. default=0.5')
@ -41,6 +41,8 @@ if __name__=="__main__":
parser.add_argument('--clamp_upper', type=float, default=0.01)
parser.add_argument('--Diters', type=int, default=5, help='number of D iters per each G iter')
parser.add_argument('--noBN', action='store_true', help='use batchnorm or not (only for DCGAN)')
parser.add_argument('--mlp_G', action='store_true', help='use MLP for G')
parser.add_argument('--mlp_D', action='store_true', help='use MLP for D')
parser.add_argument('--n_extra_layers', type=int, default=0, help='Number of extra layers on gen and disc')
parser.add_argument('--experiment', default=None, help='Where to store samples and models')
parser.add_argument('--adam', action='store_true', help='Whether to use adam (default is rmsprop)')