inference
adabn_fn(x, domain, models, **kwargs)
¶
AdaBN features and logits.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
The input to the model |
required | |
domain |
0 for source domain, 1 for target domain. |
required |
Source code in pytorch_adapt\inference\inference.py
18 19 20 21 22 23 24 25 26 27 28 |
|
adda_fn(x, domain, models, get_all=False, **kwargs)
¶
ADDA features and logits.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
The input to the model |
required | |
domain |
If 0, then |
required | |
models |
Dictionary of models with keys
|
required | |
get_all |
bool
|
If |
False
|
Returns:
Type | Description |
---|---|
Dict[str, torch.Tensor]
|
A dictionary of features and logits.
|
Source code in pytorch_adapt\inference\inference.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
adda_full_fn(x, **kwargs)
¶
ADDA features, logits, discriminator logits, other features, other logits, other discriminator logits. See adda_fn for the input arguments.
Returns:
Type | Description |
---|---|
Dict[str, torch.Tensor]
|
discriminator logits ( |
Source code in pytorch_adapt\inference\inference.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
adda_with_d(**kwargs)
¶
ADDA features, logits, and discriminator logits. See adda_fn for the input arguments.
Returns:
Type | Description |
---|---|
Dict[str, torch.Tensor]
|
discriminator logits as |
Source code in pytorch_adapt\inference\inference.py
68 69 70 71 72 73 74 75 76 |
|
default_fn(x, models, **kwargs)
¶
The default inference function for BaseAdapter.
Source code in pytorch_adapt\inference\inference.py
8 9 10 11 12 13 14 |
|
mcd_fn(x, models, get_all=False, **kwargs)
¶
Returns:
Type | Description |
---|---|
Features and logits, where |
Source code in pytorch_adapt\inference\inference.py
140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
rtn_fn(x, domain, models, get_all=False, **kwargs)
¶
RTN features and logits.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
The input to the model |
required | |
domain |
If 0, |
required | |
models |
Dictionary of models with keys
|
required | |
get_all |
If |
False
|
Returns:
Type | Description |
---|---|
Dict[str, torch.Tensor]
|
A dictionary of features and logits.
|
Source code in pytorch_adapt\inference\inference.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
symnets_fn(x, domain, models, get_all=False, **kwargs)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
The input to the model |
required | |
domain |
0 for the source domain, 1 for the target domain. |
required |
Returns:
Type | Description |
---|---|
Features and logits, where |
Source code in pytorch_adapt\inference\inference.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|