diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-08 01:59:20 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-08 01:59:20 +0100 |
| commit | 2034d4c0cd241106900273980ee84f808a73d196 (patch) | |
| tree | e1a331d6fd0288561a5b4944eadcdcb25514ac2b /cli/app/commands | |
| parent | a194eaa66108d753aac1eac70b7016a9b20897e1 (diff) | |
up
Diffstat (limited to 'cli/app/commands')
| -rw-r--r-- | cli/app/commands/biggan/extract_dense_vectors.py | 7 | ||||
| -rw-r--r-- | cli/app/commands/biggan/search_class.py | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/cli/app/commands/biggan/extract_dense_vectors.py b/cli/app/commands/biggan/extract_dense_vectors.py index 9f7644e..5320496 100644 --- a/cli/app/commands/biggan/extract_dense_vectors.py +++ b/cli/app/commands/biggan/extract_dense_vectors.py @@ -25,9 +25,11 @@ from app.search.json import params_dense_dict help='Feature layers used for loss') @click.option('-snap', '--snapshot_interval', 'opt_snapshot_interval', default=20, help='Interval to store sample images') +@click.option('-clip', '--clip_interval', 'opt_clip_interval', default=500, + help='Interval to clip vectors') @click.pass_context def cli(ctx, opt_folder_id, opt_latent_steps, opt_dense_steps, opt_video, - opt_stochastic_clipping, opt_label_clipping, opt_use_feature_detector, opt_feature_layers, opt_snapshot_interval): + opt_stochastic_clipping, opt_label_clipping, opt_use_feature_detector, opt_feature_layers, opt_snapshot_interval, opt_clip_interval): """ The full process: - Fetch new images from the cortex @@ -59,7 +61,8 @@ def cli(ctx, opt_folder_id, opt_latent_steps, opt_dense_steps, opt_video, opt_label_clipping=opt_label_clipping, opt_use_feature_detector=opt_use_feature_detector, opt_feature_layers=opt_feature_layers, - opt_snapshot_interval=opt_snapshot_interval + opt_snapshot_interval=opt_snapshot_interval, + opt_clip_interval=opt_clip_interval ) params = params_dense_dict(tag) diff --git a/cli/app/commands/biggan/search_class.py b/cli/app/commands/biggan/search_class.py index 6e1df95..050fbef 100644 --- a/cli/app/commands/biggan/search_class.py +++ b/cli/app/commands/biggan/search_class.py @@ -29,10 +29,11 @@ from app.utils.cortex_utils import cortex_folder, download_cortex_files, find_un help='Feature layers used for loss') @click.option('-snap', '--snapshot_interval', 'opt_snapshot_interval', default=20, help='Interval to store sample images') - +@click.option('-snap', '--clip_interval', 'opt_clip_interval', default=500, + help='Interval to clip vectors') @click.pass_context def cli(ctx, opt_folder_id, opt_fp_in, opt_dims, opt_steps, opt_limit, opt_video, opt_tag, - opt_stochastic_clipping, opt_label_clipping, opt_use_feature_detector, opt_feature_layers, opt_snapshot_interval): + opt_stochastic_clipping, opt_label_clipping, opt_use_feature_detector, opt_feature_layers, opt_snapshot_interval, opt_clip_interval): """ Search for an image (class vector) in BigGAN using gradient descent """ @@ -59,4 +60,4 @@ def cli(ctx, opt_folder_id, opt_fp_in, opt_dims, opt_steps, opt_limit, opt_video opt_feature_layers = opt_feature_layers.split(',') find_nearest_vector_for_images(paths, opt_dims, opt_steps, opt_video, opt_tag, opt_limit, - opt_stochastic_clipping, opt_label_clipping, opt_use_feature_detector, opt_feature_layers, opt_snapshot_interval) + opt_stochastic_clipping, opt_label_clipping, opt_use_feature_detector, opt_feature_layers, opt_snapshot_interval, opt_clip_interval) |
