Package: dalib
IntroductionTrans-Learnis a Transfer Learning library based on pure PyTorch with high performance and friendly API.
Our code is pythonic, and the design is consistent with torchvision. You can easily develop new algorithms, or easily apply existing algorithms..On July 24th, 2020, we released the v0.1 (preview version), the first sub-library is for Domain Adaptation (DALIB). The supported algorithms currently include:Domain-Adversarial Training of Neural Networks
(DANN)Deep Adaptation Networks (DAN)Joint Adaptation Networks (JAN)Conditional Adversarial Domain Adaptation
(CDAN)Maximum Classifier Discrepancy (MCD)Margin Disparity Discrepancy (MDD)InstallationDALIB is currently hosted onPyPI. It requires Python >= 3.6. You can simply install dalib with the following command:pipinstalldalibYou can also install with the newest version through GitHub:pipinstallgit+https://github.com/thuml/Transfer-Learning-Library.git@masterAfter installation, open your python console and type the following. If no error occurs, you have successfully installed DALIB.importdalibprint(dalib.__version__)For flexible use and modification, git clone the library is also a good choice.DocumentationYou can find the tutorial and API documentation on the website:DALIB APIAlso, we have examples in the directoryexamples. A typical usage is# Train a DANN on Office-31 Amazon -> Webcam task using ResNet 50.# Assume you have put the datasets under the path `data/office-31`,# or you are glad to download the datasets automatically from the Internet to this pathpythonexamples/dann.pydata/office31-dOffice31-sA-tW-aresnet50--epochs20In the directoryexamples, you can find all the necessary running scripts to reproduce the benchmarks with specified hyper-parameters.ContributingWe appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.Disclaimer on DatasetsThis is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have licenses to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset's license.If you're a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML community!ContactIf you have any problem with our code or have some suggestions, including the future feature, feel free to contactJunguang Jiang (JiangJunguang1123@outlook.com)Bo Fu (fb1121@vip.qq.com)Mingsheng Long (longmingsheng@gmail.com)or describe it in Issues.CitationIf you use this toolbox or benchmark in your research, please cite this project.@misc{dalib,
  author ={Junguang Jiang, Bo Fu, Mingsheng Long},
  title ={Transfer-Learning-library},
  year ={2020},
  publisher ={GitHub},
  journal ={GitHub repository},
  howpublished ={\url{https://github.com/thuml/Transfer-Learning-Library}},}