Skip to main content

Introduction

Trans-Learn is 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:

Installation

DALIB is currently hosted on PyPI. It requires Python >= 3.6. You can simply install dalib with the following command:

pip install dalib

You can also install with the newest version through GitHub:

pip install git+https://github.com/thuml/Transfer-Learning-Library.git@master

After installation, open your python console and type the following. If no error occurs, you have successfully installed DALIB.

import dalib 
print(dalib.__version__)

For flexible use and modification, git clone the library is also a good choice.

Documentation

You can find the tutorial and API documentation on the website: DALIB API

Also, we have examples in the directory examples. 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 path
python examples/dann.py data/office31 -d Office31 -s A -t W -a resnet50  --epochs 20

In the directory examples, you can find all the necessary running scripts to reproduce the benchmarks with specified hyper-parameters.

Contributing

We 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 Datasets

This 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!

Contact

If you have any problem with our code or have some suggestions, including the future feature, feel free to contact

or describe it in Issues.

Citation

If 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}},
}

Metadata

Release files for dalib 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dalib 0.2
File Size Uploaded Provenance
dalib-0.2.tar.gz 23.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dalib 0.2
File Interpreter ABI Platform
dalib-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 58.5 kB

Release files / dalib-0.2.tar.gz

Download URL dalib-0.2.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3d06b37e4f93179f907d88a84d2d1802267bc397bf9cbd6bf5c69011bbae9a6a
BLAKE2b-256 checksum
How to use checksums
40c0da61abe8904df233ae0e3663e102789ffeedf19c15534399160eac83aa70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Release files / dalib-0.2-py3-none-any.whl

Download URL dalib-0.2-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4e97b20c065316b2404fd7d9da316c3c0b1ce971a6e2f7ab86dc683d8d58c66
BLAKE2b-256 checksum
How to use checksums
8debf1728a4f4e50e939ae506acbfdc3d794ea6487e0ab35e3a6672d3946bad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Security for dalib 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page