yxgeee / MMT

[ICLR-2020] Mutual Mean-Teaching: Pseudo Label Refinery for Unsupervised Domain Adaptation on Person Re-identification.

Home Page:https://yxgeee.github.io/projects/mmt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question about "delete anything about model_2 and model_2_ema"

ITdoubleseven opened this issue · comments

when I tried to delete anything about model_2 and model_2_ema,errors occurred:
Traceback (most recent call last):
File "examples/mmt_train_kmeans.py", line 287, in
main()
File "examples/mmt_train_kmeans.py", line 132, in main
main_worker(args)
File "examples/mmt_train_kmeans.py", line 201, in main_worker
trainer = MMTTrainer(model_1, model_1_ema, num_cluster=args.num_clusters, alpha=args.alpha)
TypeError: init() missing 2 required positional arguments: 'model_1_ema' and 'model_2_ema'

the following is MMTTrainer:
class MMTTrainer(object):
def init(self, model_1, model_1_ema, num_cluster=500, alpha=0.999):
super(MMTTrainer, self).init()
self.model_1 = model_1
#self.model_2 = model_2
self.num_cluster = num_cluster

    self.model_1_ema = model_1_ema
    #self.model_2_ema = model_2_ema

BUT,it is very strange that "MMTTrainer" do not contain the parameters" model_2_ema and model_2".

Run setup command python setup.py install once changing the code in mmt/

Thank you very much.I solved this problem.