diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-11 02:25:15 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-11 02:25:15 +0100 |
| commit | e4a32154c0f55f974c8fd210495898cb15027d8c (patch) | |
| tree | 1d6336a82315db023d2b9118adf976902d2b4d8a /cli/app/commands/biggan | |
| parent | 179f98c949dbeeb383d152e46610dd6789616231 (diff) | |
dense search with args
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) |
