Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add training scripts, rm args from readme (turns out the parens don't
work in bash, oops)
- Loading branch information
1 parent
46237d4
commit b3e8808
Showing
4 changed files
with
93 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Train on ImageNet with only 10 images, by default (use --max_labels 1000 to use the full dataset). | ||
|
||
NOISE="u-200" # feature/noise (z) distribution is a 200-D uniform | ||
|
||
# BiGAN objective | ||
OBJECTIVE="--encode_gen_weight 1 --encode_weight 0 --discrim_weight 0 --joint_discrim_weight 1" | ||
|
||
# Latent Regressor (LR) objective | ||
# OBJECTIVE="--encode_gen_weight 0 --encode_weight 1 --discrim_weight 1 --joint_discrim_weight 0" | ||
|
||
# Joint Latent Regressor (Joint LR) objective | ||
# OBJECTIVE="--encode_gen_weight 0.25 --encode_weight 1 --discrim_weight 1 --joint_discrim_weight 0" | ||
|
||
NOISE="u-200" | ||
python train_gan.py \ | ||
--encode --encode_normalize \ | ||
--dataset imagenet --raw_size 72 --crop_size 64 \ | ||
--gen_net_size 64 \ | ||
--feat_net_size 64 \ | ||
--encode_net alexnet_group_padpool \ | ||
--megabatch_gb 0.5 \ | ||
--classifier --classifier_deploy \ | ||
--nolog_gain --no_decay_gain \ | ||
--deploy_iters 1000 \ | ||
--disp_samples 400 \ | ||
--max_labels 10 --epochs 200 --decay_epochs 200 \ | ||
--disp_interval 25 --save_interval 25 \ | ||
--noise ${NOISE} \ | ||
${OBJECTIVE} \ | ||
$@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
NOISE="u-200" # feature/noise (z) distribution is a 200-D uniform | ||
|
||
# BiGAN objective | ||
OBJECTIVE="--encode_gen_weight 1 --encode_weight 0 --discrim_weight 0 --joint_discrim_weight 1" | ||
|
||
./train_imagenet.sh \ | ||
--raw_size 128 --crop_size 112 --crop_resize 64 \ | ||
${OBJECTIVE} \ | ||
$@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
NOISE="u-50" # feature/noise (z) distribution is a 50-D uniform | ||
|
||
# BiGAN objective | ||
OBJECTIVE="--encode_gen_weight 1 --encode_weight 0 --discrim_weight 0 --joint_discrim_weight 1" | ||
|
||
# Latent Regressor (LR) objective | ||
# OBJECTIVE="--encode_gen_weight 0 --encode_weight 1 --discrim_weight 1 --joint_discrim_weight 0" | ||
|
||
# Joint Latent Regressor (Joint LR) objective | ||
# OBJECTIVE="--encode_gen_weight 0.25 --encode_weight 1 --discrim_weight 1 --joint_discrim_weight 0" | ||
|
||
python train_gan.py \ | ||
--encode --encode_normalize \ | ||
--dataset mnist --crop_size 28 \ | ||
--encode_net mnist_mlp \ | ||
--discrim_net mnist_mlp \ | ||
--gen_net deconvnet_mnist_mlp \ | ||
--megabatch_gb 0.5 \ | ||
--classifier --classifier_deploy \ | ||
--nolog_gain --nogain --nobias --no_decay_gain \ | ||
--deploy_iters 1000 \ | ||
--disp_samples 400 \ | ||
--disp_interval 25 \ | ||
--epochs 200 --decay_epochs 200 \ | ||
--optimizer adam \ | ||
--noise ${NOISE} \ | ||
${OBJECTIVE} \ | ||
$@ |