virajprabhu / CLUE

PyTorch code for Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings (ICCV 2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bugfix] running unsupervised da with dann

TomTaehoonKim opened this issue · comments

opt_dis_adapt = optim.Adam(discriminator.parameters(), lr=args.uda_lr, betas=(0.9, 0.999), weight_decay=0)
uda_solver.solve(epoch, discriminator, opt_dis_adapt)

In lines 305, 306 in utils.py,

UnboundLocalError: local variable 'discriminator' referenced before assignment
occurs.

Instead of discriminator, I think the code should be fixed as adapt_model.discriminator.

@virajprabhu Let me know if I got it wrong.

You're right, will fix. Thanks!