KaiyangZhou / Dassl.pytorch

A PyTorch toolbox for domain generalization, domain adaptation and semi-supervised learning.
MIT License
1.23k stars 171 forks source link

use adabn.py #53

Open yuanhaorannnnnn opened 1 year ago

yuanhaorannnnnn commented 1 year ago

At first, thanks for your work, it's a nice project in DA, DG filed. I'm using your adabn.py to deploy AdaBN method on my model, I read the code, found it's pretty simple and I think maybe there is somthing missing? From my understanding, AdaBN method is to use the mean and var of the target domain to replace the ones from the training stage on BN layers, but I just found reset running stats function in the adabn.py.

I'm looking forwar to your reply, thanks!

Liu2126 commented 5 months ago

There is an error when I tried to run adabn.py, the breakpoint appears at the following code: def check_cfg(self, cfg): assert check_isfile( cfg.MODEL.INIT_WEIGHTS ), "The weights of source model must be provided" It seems I haven't offer the INIT_WEIGHTS previously however I couldn't find anywhere to solve it.