New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing kwargs to _init_optims and _init_losses #27

merged 1 commit into from Dec 4, 2018


None yet
2 participants

mtngld commented Dec 4, 2018

Great package!

I noticed a small bug when trying to run VADA:

$ python scripts/ --log ./log --vada --source svhn --target mnist --epochs 10 --gpu 3
Start Experiments
Normalize data
Using downloaded and verified file: /tmp/data/train_32x32.mat
Normalize data
Normalize data
Using downloaded and verified file: /tmp/data/train_32x32.mat
Normalize data
Registered DigitModel as "classifier"
Registered Linear as "discriminator"
Traceback (most recent call last):
  File "scripts/", line 112, in <module>
    experiment = solver.VADASolver(model, disc, loader_plain, **kwargs)
  File "/mnt/matang/salad/salad/solver/da/", line 84, in __init__
    super(VADASolver, self).__init__(model, discriminator, dataset, *args, **kwargs)
  File "/mnt/matang/salad/salad/solver/da/", line 83, in __init__
    super().__init__(model, dataset, *args, **kwargs)
  File "/mnt/matang/salad/salad/solver/da/", line 49, in __init__
    super(DABaseSolver, self).__init__(*args, **kwargs)
  File "/mnt/matang/salad/salad/solver/", line 80, in __init__
    super().__init__(dataset=dataset, *args, **kwargs)
  File "/mnt/matang/salad/salad/solver/", line 201, in __init__
    StructuredInit.__init__(self, **kwargs)
  File "/mnt/matang/salad/salad/solver/", line 49, in __init__
TypeError: _init_losses() got an unexpected keyword argument 'learningrate'

By making the suggested change, I can run VADA succesfully.


@stes stes self-assigned this Dec 4, 2018


stes approved these changes Dec 4, 2018

Thanks for contributing this PR!
To add some background, I think this error was introduced when I added the **kwargs in the Solver super class (that's why the error should currently not occur in the pip package).

@stes stes merged commit ba7abe1 into domainadaptation:master Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment