Skip to content
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

Code is not complete #5

Closed
FrancescoCappio opened this issue Jul 27, 2021 · 6 comments
Closed

Code is not complete #5

FrancescoCappio opened this issue Jul 27, 2021 · 6 comments

Comments

@FrancescoCappio
Copy link

Hello!
I wanted to run your method but I have this error:

$ CUDA_VISIBLE_DEVICES=0 python office_run.py note=replicating_r0 setting=osda source=amazon target=dslr
Traceback (most recent call last):
  File "office_run.py", line 8, in <module>
    from init_config import *
  File "/home/francesco/projects/Domain-Consensus-Clustering/init_config.py", line 4, in <module>
    from utils.flatwhite import *
  File "/home/francesco/projects/Domain-Consensus-Clustering/utils/__init__.py", line 1, in <module>
    from .cdd import *
  File "/home/francesco/projects/Domain-Consensus-Clustering/utils/cdd.py", line 2, in <module>
    from .dist  import to_cuda
ModuleNotFoundError: No module named 'utils.dist'

Indeed there is not utils/dist.py file in the repo, could you upload it?

@Solacex
Copy link
Owner

Solacex commented Jul 27, 2021

Hello.

I have fixed and updated this part, you can try it again.

@FrancescoCappio
Copy link
Author

Thank you for your fast reply! That error is solved but I am afraid there are others. Eg:

Traceback (most recent call last):
  File "office_run.py", line 75, in <module>
    main()
  File "office_run.py", line 57, in main
    trainer.train()
  File "/home/francesco/projects/Domain-Consensus-Clustering/trainer/dcc1_trainer.py", line 114, in train
    self.optimize()
  File "/home/francesco/projects/Domain-Consensus-Clustering/trainer/dcc1_trainer.py", line 80, in optimize
    losses = self.iter(i_iter)
  File "/home/francesco/projects/Domain-Consensus-Clustering/trainer/dcc1_trainer.py", line 68, in iter
    en_loss = self.memory.forward(t_feat, t_label, t=self.config.t, joint=False)
TypeError: forward() got an unexpected keyword argument 'joint'

@FrancescoCappio
Copy link
Author

I removed that joint parameter and now the code seems to be running

@FrancescoCappio
Copy link
Author

However after a short time:

Traceback (most recent call last):
  File "office_run.py", line 75, in <module>
    main()
  File "office_run.py", line 57, in main
    trainer.train()
  File "/home/francesco/projects/Domain-Consensus-Clustering/trainer/dcc1_trainer.py", line 114, in train
    self.optimize()
  File "/home/francesco/projects/Domain-Consensus-Clustering/trainer/dcc1_trainer.py", line 85, in optimize
    self.class_set = self.re_clustering(i_iter)
  File "/home/francesco/projects/Domain-Consensus-Clustering/trainer/dcc1_trainer.py", line 122, in re_clustering
    self.memory.init_source(self.init_src_private_centers)
  File "/home/francesco/environment/dl-study/lib/python3.6/site-packages/torch/nn/modules/module.py", line 772, in __getattr__
    type(self).__name__, name))
torch.nn.modules.module.ModuleAttributeError: 'Memory' object has no attribute 'init_source'

@Solacex
Copy link
Owner

Solacex commented Jul 28, 2021

Hello.

I have fixed this part, could you try it again?

@FrancescoCappio
Copy link
Author

Thank you!
Now the code runs fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants