GithubHelp home page GithubHelp logo

wzell / mmd-caffe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhuhan1236/mmd-caffe

0.0 1.0 0.0 6.6 MB

Caffe implementation for ICML paper "Learning Transferable Features with Deep Adaptation Networks"

License: Other

CMake 3.13% Makefile 0.72% C++ 79.95% MATLAB 0.71% Python 8.62% Shell 0.30% Cuda 5.23% Protocol Buffer 1.35%

mmd-caffe's Introduction

mmd-caffe

This is the implementation of ICML paper "Learning Transferable Features with Deep Adaptation Networks". We fork the repository with version ID c6414ea from Caffe and make our modifications. The main modifications are listed as follow:

  • Change the label from a single integer to a tuple, which contains the origin label and an indicator to distinguish source and target
  • Add mmd layer described in the paper to neuron layers

Training Model

In models/icml/amazon_to_webcam_common_setting, we give an example model based on Alexnet. In this model, we insert mmd layers after inception fc7 and fc8 individually.

The bvlc_reference_caffenet is used as the pre-trained model.

Data Preparation

In data/office/amazon_to_webcam_common_setting/*.txt, we give an example to show how to prepare the train and test data file. In this task, amazon dataset is the source domain and webcam dataset is the target domain. For training data in source domain, it's label looks like (-1, origin_label). For training data in target domain, it's label looks like (origin_label, -1). For testing data, it's label looks like (origin_label, -1). Integer -1 is used to distinguish source and target during training and testing, and origin_label is the acutal label of the image.

For semi-supervised tasks, the label of labeled target data looks like (I, origin_label). I is any positive integer (larger than the number of classes) and should be added to ignore_label of entropy loss layer.

Parameter Tuning

In mmd-layer, parameter iter_of_epoch should be set to tell mmd layer when to update data. Practically, iter_of_epoch = (source_num + target_num) / batch_size. Users only need to tune mmd_lambda parameter.

Dependency

We use CGAL to solve Quadratic Programming problem when updating beta. Please install it before compiling this code. We add CGAL as LIBRARIES in Makefile. However, if you prefer to compile caffe with cmake, maybe you should config CGAL yourself.

mmd-caffe's People

Contributors

zhuhan1236 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.