Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
floft committed May 18, 2020
1 parent 021577d commit e533aa0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Multi-Source Deep Domain Adaptation with Weak Supervision for Time-Series Sensor Data

Steps:

- Convert to .tfrecord files for TensorFlow (*./generate_tfrecords.sh*)
- Train models (*main.py* or *kamiak_train.srun*)
- Evaluate models (*main_eval.py* or *kamiak_eval.srun*)
- Train models (*main.py* or *kamiak_train_\*.srun*)
- Evaluate models (*main_eval.py* or *kamiak_eval_\*.srun*)
- Analyze results (*analysis.py*)

## Installation

This requires the following packages (*module load* for Kamiak):
We require the following packages (*module load* for Kamiak). Adjust for your
computer setup.

module load cuda/10.1.105 cudnn/7.6.4.38_cuda10.1 python3/3.7.4
pip install --user --upgrade pip
Expand All @@ -21,7 +21,8 @@ This requires the following packages (*module load* for Kamiak):
# If using --moving_average (typically tensorflow-addons, but that errors at the moment with TF 2.2)
pip3 install --user git+https://github.com/tensorflow/[email protected]

For the CPU-only jobs like *kamiak_train_simple.srun*:
Or, to use only the CPU, set up as follows and modify the train scripts to
source *kamiak_tensorflow_cpu.sh*.

module load python3/3.7.4
export PATH="$HOME/.local/bin:$PATH"
Expand All @@ -43,12 +44,13 @@ For the CPU-only jobs like *kamiak_train_simple.srun*:
# If using --moving_average
pip install git+https://github.com/tensorflow/[email protected]

## Training

sbatch -J train kamiak_train.srun adapt
## Running

## Evaluating
See the single-source and multi-source domain adaptation training/evaluation
scripts for examples.

sbatch -J eval kamiak_eval.srun adapt
sbatch -J train kamiak_train_ssda.srun adapt
sbatch -J eval kamiak_eval_ssda.srun adapt

Then look at the resulting *results/results_\*.txt* file or analyze with *analysis.py*.
Then look at the resulting *results/results_\*.txt* file or analyze with
*analysis.py*.
1 change: 1 addition & 0 deletions methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ def eval_step_list(self, data, is_target):
return task_y_true_avg, task_y_pred_avg, domain_y_true_avg, \
domain_y_pred_avg, losses_avg


#
# Homogeneous domain adaptation
#
Expand Down

0 comments on commit e533aa0

Please sign in to comment.