Shortcuts

Co-Tuning

class ftlib.finetune.co_tuning.CoTuningLoss[source]

The Co-Tuning loss in Co-Tuning for Transfer Learning (NIPS 2020).

Inputs:
  • input: p(y_s) predicted by source classifier.

  • target: p(y_s|y_t), where y_t is the ground truth class label in target dataset.

Shape:
  • input: (b, N_p), where b is the batch size and N_p is the number of classes in source dataset

  • target: (b, N_p), where b is the batch size and N_p is the number of classes in source dataset

  • Outputs: scalar.

class ftlib.finetune.co_tuning.Relationship(data_loader, classifier, device, cache=None)[source]

Learns the category relationship p(y_s|y_t) between source dataset and target dataset.

Parameters

Docs

Access comprehensive documentation for Transfer Learning Library

View Docs

Tutorials

Get started for transfer learning

Get Started