diff options
Diffstat (limited to 'cli/app/commands/biggan')
| -rw-r--r-- | cli/app/commands/biggan/search_dense.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/cli/app/commands/biggan/search_dense.py b/cli/app/commands/biggan/search_dense.py index 0cf56a3..b743350 100644 --- a/cli/app/commands/biggan/search_dense.py +++ b/cli/app/commands/biggan/search_dense.py @@ -1,15 +1,22 @@ import click -from app.search.params import Params +from app.search.params import Params, timestamp from app.search.search_dense import find_dense_embedding_for_images @click.command('') @click.option('-i', '--input', 'opt_fp_in', required=True, help='Path to input image') +@click.option('-t', '--tag', 'opt_tag', default="inverse_" + timestamp(), + help='Tag this build') +@click.option('-ll', '--feature_layers', 'opt_feature_layers', default="1a,2a,4a,7a", + help='Feature layers used for loss') +@click.option('-s', '--save_progress', 'opt_save_progress', is_flag=True, + help='Save example images every 500 frames') @click.pass_context -def cli(ctx, opt_fp_in): +def cli(ctx, opt_fp_in, opt_tag, opt_feature_layers, opt_save_progress): """ Search for an image (class vector) in BigGAN using gradient descent """ params = Params(opt_fp_in) - find_dense_embedding_for_images(params) + opt_feature_layers = opt_feature_layers.split(',') + find_dense_embedding_for_images(params, opt_tag=opt_tag, opt_feature_layers=opt_feature_layers, opt_save_progress=opt_save_progress) |
