domainlab.algos.trainers.compos package¶
Submodules¶
domainlab.algos.trainers.compos.matchdg_args module¶
args for matchdg
domainlab.algos.trainers.compos.matchdg_match module¶
domainlab.algos.trainers.compos.matchdg_utils module¶
create dictionary for matching
- class domainlab.algos.trainers.compos.matchdg_utils.MatchDictInit(keys, vals, i_c, i_h, i_w)[source]¶
Bases:
object
base class for matching dictionary creator
- class domainlab.algos.trainers.compos.matchdg_utils.MatchDictNumDomain2SizeDomain(num_domains_tr, list_tr_domain_size, i_c, i_h, i_w)[source]¶
Bases:
MatchDictInit
tensor dimension for the kth domain: [num_domains_tr, (size_domain_k, i_c, i_h, i_w)]
- class domainlab.algos.trainers.compos.matchdg_utils.MatchDictVirtualRefDset2EachDomain(virtual_ref_dset_size, num_domains_tr, i_c, i_h, i_w)[source]¶
Bases:
MatchDictInit
dict[0:virtual_ref_dset_size] has tensor dimension: (num_domains_tr, i_c, i_h, i_w)
- domainlab.algos.trainers.compos.matchdg_utils.dist_cosine_agg(x1, x2)[source]¶
torch.nn.CosineSimilarity assumes x1 and x2 share exactly the same dimension