/tlbook-code

Code for Transfer Learning book--《迁移学习导论》配套代码

Primary LanguagePythonApache License 2.0Apache-2.0

Code for 'Introduction to transfer learning' book 《迁移学习导论》(第二版)代码

This folder contains the codes for the book Introduction to Transfer Learning: Algorithms and Practice. 迁移学习导论.

Links for the Chinese book (2nd edition) can be found at: links.md. 中文第二版书中的链接请见这里

Dataset

  1. For algorithm chapters (chapters 1 ~ 11), we mainly use Office-31 dataset, download HERE:
  • For non-deep learning methods (chapters 1~7), we use ResNet-50 pre-trained features. Thus, download the ResNet-50 features.
  • For deep learning methods (chapters 8~11), we use Office-31 original dataset. Thus, download the raw images.
  1. For application chapters (chapters 15~19), the datasets download link can be found at respective chapters.

Requirements

The following is a basic environment to run most experiments. No special tricky packages are needed. Just pip install -r requirements.txt.

  • Python 3.x
  • scikit-learn
  • numpy
  • scipy
  • torch
  • torchvision

Citation

If you find the code or the book helpful, please consider citing our book as:

@book{tlbook,
 author = {Wang, Jindong and Chen, Yiqiang},
 title = {Introduction to Transfer Learning: Algorithms and Practice},
 year = {2023},
 url = {jd92.wang/tlbook},
 publisher = {Springer Nature}
}

@book{tlbookchinese,
 author = {王晋东 and 陈益强},
 title = {迁移学习导论},
 year = {2021},
 url = {jd92.wang/tlbook}
}

Recommended Repo

My unified transfer learning repo (and the most popular transfer learning repo on Github) has everything you need for transfer learning: https://github.com/jindongwang/transferlearning. Including: Papers, codes, datasets, benchmarks, applications etc.