Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
876a9325
Commit
876a9325
authored
Apr 03, 2017
by
Neal Wu
Browse files
Fix double-pasted README and add code tags around the terminal commands
parent
c09f0ccf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
47 deletions
+11
-47
domain_adaptation/README.md
domain_adaptation/README.md
+11
-47
No files found.
domain_adaptation/README.md
View file @
876a9325
...
@@ -25,14 +25,20 @@ Twitter @bousmalis.
...
@@ -25,14 +25,20 @@ Twitter @bousmalis.
In order to run the MNIST to MNIST-M experiments with DANNs and/or DANNs with
In order to run the MNIST to MNIST-M experiments with DANNs and/or DANNs with
domain separation (DSNs) you will need to set the directory you used to download
domain separation (DSNs) you will need to set the directory you used to download
MNIST and MNIST-M:
\
MNIST and MNIST-M:
\
```
$ export DSN_DATA_DIR=/your/dir
$ export DSN_DATA_DIR=/your/dir
```
Then you need to build the binaries with Bazel:
Then you need to build the binaries with Bazel:
```
$ bazel build -c opt domain_adaptation/domain_separation/...
$ bazel build -c opt domain_adaptation/domain_separation/...
```
You can then train with the following command:
You can then train with the following command:
```
$ ./bazel-bin/domain_adaptation/domain_separation/dsn_train \
$ ./bazel-bin/domain_adaptation/domain_separation/dsn_train \
--similarity_loss=dann_loss \
--similarity_loss=dann_loss \
--basic_tower=dann_mnist \
--basic_tower=dann_mnist \
...
@@ -46,55 +52,13 @@ $ ./bazel-bin/domain_adaptation/domain_separation/dsn_train \
...
@@ -46,55 +52,13 @@ $ ./bazel-bin/domain_adaptation/domain_separation/dsn_train \
--master="" \
--master="" \
--dataset_dir=${DSN_DATA_DIR} \
--dataset_dir=${DSN_DATA_DIR} \
-v --use_logging
-v --use_logging
```
Evaluation can be invoked with the following command:
Evaluation can be invoked with the following command:
\
```
$ ./bazel-bin/domain_adaptation/domain_separation/dsn_eval \
$ ./bazel-bin/domain_adaptation/domain_separation/dsn_eval \
-v --dataset mnist_m --split test --num_examples=9001 \
-v --dataset mnist_m --split test --num_examples=9001 \
--dataset_dir=${DSN_DATA_DIR}
--dataset_dir=${DSN_DATA_DIR}
# Domain Separation Networks
```
## Introduction
This code is the code used for the "Domain Separation Networks" paper
by Bousmalis K., Trigeorgis G., et al. which was presented at NIPS 2016. The
paper can be found here: https://arxiv.org/abs/1608.06019
## Contact
This code was open-sourced by Konstantinos Bousmalis (konstantinos@google.com, github:bousmalis)
## Installation
You will need to have the following installed on your machine before trying out the DSN code.
*
Tensorflow: https://www.tensorflow.org/install/
*
Bazel: https://bazel.build/
## Running the code for adapting MNIST to MNIST-M
In order to run the MNIST to MNIST-M experiments with DANNs and/or DANNs with
domain separation (DSNs) you will need to set the directory you used to download
MNIST and MNIST-M:
\
$ export DSN_DATA_DIR=/your/dir
Then you need to build the binaries with Bazel:
$ bazel build -c opt domain_adaptation/domain_separation/...
Add models and models/slim to your $PYTHONPATH:
$ export PYTHONPATH=$PYTHONPATH:$PWD/slim
\
$ export PYTHONPATH=$PYTHONPATH:$PWD
You can then train with the following command:
$ ./bazel-bin/domain_adaptation/domain_separation/dsn_train
\
--similarity_loss=dann_loss
\
--basic_tower=dann_mnist
\
--source_dataset=mnist
\
--target_dataset=mnist_m
\
--learning_rate=0.0117249
\
--gamma_weight=0.251175
\
--weight_decay=1e-6
\
--layers_to_regularize=fc3
\
--nouse_separation
\
--master=""
\
--dataset_dir=${DSN_DATA_DIR}
\
-v --use_logging
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment