Pytorch-adapt

Latest version: v0.0.83

Safety actively analyzes 639221 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.0.76

Code change

Simplified code in `frameworks.ignite.checkpoint_utils` by using the latest version of pytorch-ignite.

0.0.75

Features

Removed memory-inefficient operation from MCCLoss

0.0.74

Features

- Pass `kwargs` down from pretrained model getters to `load_state_dict_from_url`. For example, this allows `map_location` to be specified:

python
from pytorch_adapt.models import office31C

model = office31C(domain="dslr", pretrained=True, map_location=torch.device("cpu"))

0.0.73

Bug Fixes

- Fixed 69

0.0.72

Added a `supervised` flag for dataset getters

Setting this to `True` results in labeled `target_train` and `target_val` datasets.

Example:
python
from pytorch_adapt.datasets import get_mnist_mnistm

datasets = get_mnist_mnistm(
["mnist"],
["mnistm"],
folder=".",
supervised=True,
)

datasets["target_train"] and datasets["target_val"] are of type TargetDataset, with self.supervised = True


Setting `return_target_with_labels=True` returns type `TargetDataset` instead of `SourceDataset`

Example:
python
from pytorch_adapt.datasets import get_mnist_mnistm

datasets = get_mnist_mnistm(
["mnist"],
["mnistm"],
folder=".",
return_target_with_labels=True,
)

datasets["target_train_with_labels"] and datasets["target_val_with_labels"] are of type TargetDataset


Thanks to deepseek-eoghan for the contribution.

0.0.71

Improvements to TargetDataset

- A new supervised flag, for switching between supervised and unsupervised domain adaptation.
- Allow the wrapped dataset to return either (data, label) or just data

See the [documentation](https://kevinmusgrave.github.io/pytorch-adapt/docs/datasets/target_dataset/)

Code changes:
61 by deepseek-eoghan

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.