Home

Awesome

Unsupervised Domain Adaptation with Central Moment Discrepancy in Keras

This repository contains code for reproducing the experiments reported in the paper

that extends the preliminary conference version

Requirements

The implementation is based on the neural networks library keras (version 1.1) and tested with theano backend (version 0.9). For installing theano and keras please follow the installation instruction on the respective github pages. You will also need: numpy, pandas, seaborn, matplotlib, and scipy. The file artificial_example.py demonstrates how to update the approach for newer versions of keras (>2.0).

Datasets

In our paper, we report results for one artificial dataset and two benchmark datasets: AmazonReview and Office. In addition, the model weights of the AlexNet model pre-trained on Imagenet are used. The artificial dataset and the AmazonReviews dataset are provided. The Office data set can be downloaded from https://drive.google.com/file/d/0B4IapRTv9pJ1WGZVd1VDMmhwdlE/view. Copy the folders amazon, dslr and webcam to data/office_dataset/. Download the AlexNet weights file from http://files.heuritech.com/weights/alexnet_weights.h5 and copy it to data/office_dataset/.

Experiments

Use the files, artificial_example.py, object_recognition.py, sentiment_analysis.py and parameter_sensitivity.py to run the experiments and create the images from the paper. For faster evaluation times, the full object recognition experiment is under comments.

System Configuration

Please note that the exact results depend on your system setup (CuDNN version, etc.), theano or tensorflow configuration (float32, etc.) and hardware (GPU etc.). In the paper, we report results based on the system described in the requirements.txt. Non-deterministic behaviour of GPUs with keras, of theano on GPUs and of tensorflow on GPUs have been reported independently of our project.