thuml / Transfer-Learning-Library

Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization
http://transfer.thuml.ai
MIT License
3.39k stars 553 forks source link

error while running train script #194

Closed 1alexey-b1 closed 1 year ago

1alexey-b1 commented 1 year ago

I set up env with: python setup.py install pip install -r requirements.txt

and then i try to launch training with next command: python3 ./examples/domain_adaptation/image_regression/dann.py ImageRegression -d ImageRegression -s A -t W -a resnet50 --epochs 20

and i get: Traceback (most recent call last): File "./examples/domain_adaptation/image_regression/dann.py", line 313, in main(args) File "./examples/domain_adaptation/image_regression/dann.py", line 66, in main train_source_dataset = dataset( TypeError: init() got an unexpected keyword argument 'task'

thucbx99 commented 1 year ago

This is because ImageRegression is the superclass. Usually we inherit from it and implement the subclass, such as DSprites. I think maybe you want to train on your custom dataset?