Coder Social home page Coder Social logo

hmr's Introduction

HMR

This repository (currently) contains Python3 code to reproduce experiments of HMR method described in our ICML'19 paper Heterogeneous Model Reuse via Optimizing Multiparty Multiclass Margin. Check this poster for quick introduction.

Reproduce toy example

Please check HMR_toy_example.ipynb in ipynb folder.

Reproduce benchmark experiment on Fashion-MNIST

Please notice currently I have only tested on Python 3.6.5 on Windows 10 64-bit with the following dependencies:

tensorflow == 1.9.0
numpy == 1.14.3
matplotlib == 2.2.2
seaborn == 0.9.0
pandas == 0.23.0

Please download the fashion_mnist folder and run run_all.bat (for Windows) or run_all.sh (for Linux).

The procedure in that batch file is:

  1. train_local_models.py trains local models according to different settings described in config files in folder config, and saves the trained models into folder model.
  2. HMR.py loads pre-trained local models, and runs our HMR method on different random seeds. Then saves the experimental results into folder exp.
  3. plot_exp_result.py collects all the experimental results and plots the figure we used in our paper. The figure will be saved as figure.pdf.

A full run may take about 1 day on my single Titan Xp GPU.

Reproduce multi-lingual handwriting experiment

We regret to say that we cannot provide everything to reproduce this experiment because some datasets are not allowed to share publicly on github. Please read the details provided in our supplementary file. Basically speaking, we use the same code as Fashion-MNIST to run the multi-lingual experiment. There are some "dirty work" to clean up and rescale all the datasets to 64*64 images, and you need to implement different API_*.py files to handle heterogeneous network structures. Feel free to contact me if you are interested in reimplement this experiment.


If you have questions or comments about anything related to this work, please do not hesitate to contact Xi-Zhu Wu.

hmr's People

Contributors

yuriwu avatar

Stargazers

Fu-Yun Wang avatar  avatar  avatar JQ Liu avatar  avatar  avatar Jie-Jing Shao avatar  avatar STYLIANOS IORDANIS avatar Pandaaaaaaa avatar 高大山 Dashan Gao 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.