SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.07740 · CVPR · 2022

Exact Feature Distribution Matching for Arbitrary Style Transfer and Domain Generalization

Lei Zhang, Kui Jia, Yabin Zhang, Minghan Li, Ruihuang Li

arXiv · PDF · Open in the Atlas

Code that ran

13 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2203.07740.json · badge: /api/ran/2203.07740.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
YBZh/EFDM canonical (classifier label)
classifier basis not recorded on the link
12 ran · 2 no recorded run
zhongliangguo/acdm community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
adaptive_instance_normalization Ran
ran; our contract draft was wrong, not the code
YBZh/EFDM/ArbitraryStyleTransfer/function.py
code served (permissive licence) · get_code("16679a24b9881031")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create small 4D tensors for content and style features
# Shape: (N, C, H, W) where N=batch, C=channels, H=height, W=width
# Using distinct sizes: batch=2, channels=4, height=3, width=5
content_feat = torch.randn(2, 4, 3, 5)
style_feat = torch.randn(2, 4, 3, 5)

ARGS = {
    "content_feat": content_feat,
    "style_feat": style_feat,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
adaptive_mean_normalization Ran
ran on a synthesized input
YBZh/EFDM/ArbitraryStyleTransfer/function.py
code served (permissive licence) · get_code("b37397d52a07f40e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
torch.manual_seed(0)

# Create small 4D tensors (N, C, H, W)
# N=2 (batch), C=4 (channels), H=3 (height), W=5 (width)
content_feat = torch.randn(2, 4, 3, 5)
style_feat = torch.randn(2, 4, 3, 5)

ARGS = {
    "content_feat": content_feat,
    "style_feat": style_feat,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calc_mean_std Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YBZh/EFDM/ArbitraryStyleTransfer/function.py
code served (permissive licence) · get_code("38eaf8511dc7bc9c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 5, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function expects a 4D tensor (N, C, H, W)
# N = batch size, C = channels, H = height, W = width
# Using distinct sizes: batch=2, channels=4, height=3, width=5
feat = torch.randn(2, 4, 3, 5)

ARGS = {
    "feat": feat,
    "eps": 1e-05
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 5, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_ci95 Ran
ran, honoured the contract we drafted
YBZh/EFDM/DomainGeneralization/imcls/parse_test_res.py
code served (permissive licence) · get_code("ba26afd892405335")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# compute_ci95 takes a single parameter 'res' which is used with:
# - np.std(res) - needs array-like
# - np.sqrt(len(res)) - needs len() to work
# A simple numpy array or list works perfectly

res = np.array([1.2, 2.3, 3.1, 4.5, 5.2, 6.1, 7.3, 8.9])

ARGS = {
    "res": res
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
efdm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhongliangguo/acdm/efdm.py
code served (permissive licence) · get_code("6d8ec9b9ea1ce367")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors with distinct dimensions for content and style features
# B=2 (batch), C=4 (channels), W=3 (width), H=5 (height)
content_feat = torch.randn(2, 4, 3, 5)
style_feat = torch.randn(2, 4, 3, 5)

ARGS = {
    "content_feat": content_feat,
    "style_feat": style_feat,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
imagedata_kwargs Ran
ran on a synthesized input
YBZh/EFDM/DomainGeneralization/reid/default_config.py
code served (permissive licence) · get_code("f0b768ed9d252a84")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from types import SimpleNamespace

torch.manual_seed(0)

# Create a config object with all required nested attributes
cfg = SimpleNamespace(
    data=SimpleNamespace(
        root='/data',
        sources=['source1', 'source2'],
        targets=['target1'],
        height=256,
        width=128,
        transforms=['resize', 'normalize'],
        k_tfm=4,
        norm_mean=[0.485, 0.456, 0.406],
        norm_std=[0.229, 0.224, 0.225],
        split_id=0,
        combineall=False,
        load_train_targets=True,
        workers=2,
        workers_count=2
    ),
    use_gpu=False,
    train=SimpleNamespace(
        batch_size=32
    ),
    test=SimpleNamespace(
        batch_size=64
    ),
    sampler=SimpleNamespace(
        num_instances=4,
        num_cams=2,
        train_sampler='RandomIdentitySampler',
        train_sampler_t='RandomIdentitySampler'
    ),
    cuhk03=SimpleNamespace(
        labeled_images=True,
        classic_split=True
    ),
    market1501=SimpleNamespace(
        use_500k_distractors=False
    )
)

ARGS = {
    'cfg': cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
lua_recursive_source Ran
ran; our contract draft was wrong, not the code
YBZh/EFDM/ArbitraryStyleTransfer/torch_to_pytorch.py
code served (permissive licence) · get_code("56fbe35b933005f0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned map. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockModule:
    """Mock module with .modules attribute"""
    def __init__(self, submodules):
        self.modules = submodules

class MockConvolution:
    def __init__(self):
        self.nInputPlane = 3
        self.nOutputPlane = 64
        self.kW = 3
        self.kH = 3
        self.dW = 1
        self.dH = 1
        self.padW = 1
        self.padH = 1
        self.groups = 1
        self.bias = True

class MockBatchNorm:
    def __init__(self):
        self.running_mean = torch.randn(64)
        self.eps = 1e-5
        self.momentum = 0.1
        self.affine = True

class MockReLU:
    pass

class MockMaxPooling:
    def __init__(self):
        self.kW = 2
        self.kH = 2
        self.dW = 2
        self.dH = 2
        self.padW = 0
        self.padH = 0
        self.ceil_mode = False

class MockAveragePooling:
    def __init__(self):
        self.kW = 2
        self.kH = 2
        self.dW = 2
        self.dH = 2
        self.padW = 0
        self.padH = 0
        self.ceil_mode = False

class MockUpSamplingNearest:
    def __init__(self):
        self.scale_factor = 2

class MockView:
    pass

class MockLinear:
    def __init__(self):
        self.weight = torch.randn(128, 256)
        self.bias = torch.randn(128)

class MockDropout:
    def __init__(self):
        self.p = 0.5

class MockSoftMax:
    pass

class MockIdentity:
    pass

class MockConvTranspose:
    def __init__(self):
        self.nInputPlane = 64
        self.nOutputPlane = 32
        self.kW = 3
        self.kH = 3
        self.dW = 1
        self.dH = 1
        self.padW = 1
        self.padH = 1

class MockReplicationPadding:
    def __init__(self):
        self.pad_l = 1
        self.pad_r = 1
        self.pad_t = 1
        self.pad_b = 1

class MockReflectionPadding:
    def __init__(self):
        self.pad_l = 1
        self.pad_r = 1
        self.pad_t = 1
        self.pad_b = 1

class MockCopy:
    pass

class MockNarrow:
    def __init__(self):
        self.dimension = 1
        self.index = 0
        self.length = 5

class MockSequential:
    def __init__(self, submodules):
        self.modules = submodules

class MockConcatTable:
    def __init__(self, submodules):
        self.modules = submodules

class MockCAddTable:
    pass

class MockConcat:
    def __init__(self, submodules):
        self.dimension = 1
        self.modules = submodules

class MockUnknown:
    pass

# Build a test module hierarchy
submodules = [
    MockConvolution(),
    MockBatchNorm(),
    MockReLU(),
    MockMaxPooling(),
    MockAveragePooling(),
    MockUpSamplingNearest(),
    MockView(),
    MockLinear(),
    MockDropout(),
    MockSoftMax(),
    MockIdentity(),
    MockConvTranspose(),
    MockReplicationPadding(),
    MockReflectionPadding(),
    MockCopy(),
    MockNarrow(),
    MockSequential([MockReLU()]),
    MockConcatTable([MockReLU()]),
    MockCAddTable(),
    MockConcat([MockReLU()]),
    MockUnknown(),
]

module = MockModule(submodules)

ARGS = {
    'module': module
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type map — a map output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a map output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
optimizer_kwargs Ran
ran on a synthesized input
YBZh/EFDM/DomainGeneralization/reid/default_config.py
code served (permissive licence) · get_code("d3e1b4b879ea0786")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from types import SimpleNamespace

torch.manual_seed(0)

# Create a config object with all required nested attributes
cfg = SimpleNamespace(
    train=SimpleNamespace(
        optim='sgd',
        lr=0.01,
        weight_decay=1e-4,
        staged_lr=False,
        new_layers=['layer4'],
        base_lr_mult=0.1
    ),
    sgd=SimpleNamespace(
        momentum=0.9,
        dampening=0.0,
        nesterov=True
    ),
    rmsprop=SimpleNamespace(
        alpha=0.99
    ),
    adam=SimpleNamespace(
        beta1=0.9,
        beta2=0.999
    )
)

ARGS = {'cfg': cfg}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
osnet_x0_75 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YBZh/EFDM/DomainGeneralization/reid/models/osnet_db.py
code served (permissive licence) · get_code("1991f5d9f34aa70f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned OSNet. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn
import torch.nn.functional as F

torch.manual_seed(0)

# Build a minimal OSNet model structure
class OSNet(nn.Module):
    def __init__(self, num_classes=1000, feature_dim=512):
        super(OSNet, self).__init__()
        self.num_classes = num_classes
        self.feature_dim = feature_dim
        # Minimal conv layers
        self.conv1 = nn.Conv2d(3, 32, kernel_size=7, stride=2, padding=3)
        self.bn1 = nn.BatchNorm2d(32)
        self.relu = nn.ReLU(inplace=True)
        self.pool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1)
        # Feature extraction layers
        self.layer1 = nn.Conv2d(32, 64, kernel_size=3, stride=1, padding=1)
        self.bn2 = nn.BatchNorm2d(64)
        self.layer2 = nn.Conv2d(64, 128, kernel_size=3, stride=2, padding=1)
        self.bn3 = nn.BatchNorm2d(128)
        self.layer3 = nn.Conv2d(128, 256, kernel_size=3, stride=2, padding=1)
        self.bn4 = nn.BatchNorm2d(256)
        # Global average pooling and classifier
        self.global_avgpool = nn.AdaptiveAvgPool2d((1, 1))
        self.feat_bn = nn.BatchNorm1d(feature_dim)
        self.feat_bn.bias.requires_grad_(False)
        self.classifier = nn.Linear(256, num_classes)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        x = self.relu(x)
        x = self.pool(x)
        x = self.layer1(x)
        x = self.bn2(x)
        x = self.relu(x)
        x = self.layer2(x)
        x = self.bn3(x)
        x = self.relu(x)
        x = self.layer3(x)
        x = self.bn4(x)
        x = self.relu(x)
        x = self.global_avgpool(x)
        x = x.view(x.size(0), -1)
        return x

# Create model instance
model = OSNet(num_classes=751, feature_dim=512)

# Create input tensor
x = torch.randn(2, 3, 64, 64)

# Create target labels
y = torch.randint(0, 751, (2,))

# Create a minimal classifier
classifier = nn.Linear(256, 751)

# Create criterion
criterion = nn.CrossEntropyLoss()

# Create optimizer
optimizer = torch.optim.Adam(model.parameters(), lr=0.0001)

# Build ARGS dictionary with all necessary arguments for osnet_x0_75
ARGS = {
    'model': model,
    'x': x,
    'y': y,
    'classifier': classifier,
    'criterion': criterion,
    'optimizer': optimizer,
    'num_classes': 751,
    'loss_type': 'softmax',
    'pretrained': False,
    'use_gpu': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gdown, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OSNet — a OSNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OSNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
search_sorted Ran
ran on a synthesized input
YBZh/EFDM/DomainGeneralization/reid/models/mixhm.py
code served (permissive licence) · get_code("69140e8e79dae940")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# bin_locations: a tensor of bin edges, shape can be [..., num_bins]
# The function accesses bin_locations[..., -1] and compares with inputs[..., None]
# inputs: a tensor to search, shape can be [..., ]
# The function compares inputs[..., None] >= bin_locations, so broadcasting must work

bin_locations = torch.tensor([[0.0, 1.0, 2.0, 3.0],
                               [0.5, 1.5, 2.5, 3.5]], dtype=torch.float32)

inputs = torch.tensor([[0.3, 1.5],
                       [2.1, 3.2]], dtype=torch.float32)

eps = -1e-06

ARGS = {
    "bin_locations": bin_locations,
    "inputs": inputs,
    "eps": eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family int, shape (2, 2) — shape (2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simplify_source Ran
ran; our contract draft was wrong, not the code
YBZh/EFDM/ArbitraryStyleTransfer/torch_to_pytorch.py
code served (permissive licence) · get_code("7e2ea00ab6257df1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function takes a single parameter 's' which is an iterable of strings
# The function applies a series of string replacements using map and lambda
# Then reduces them with string concatenation
# So 's' should be an iterable (list) of strings

ARGS = {
    's': [
        '(Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1),(1, 1),(0, 0),1,1,bias=True),#Conv2d',
        '(BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True),1e-05,0.1,True),#BatchNorm2d',
        '(MaxPool2d(kernel_size=2, stride=2, padding=0,(0, 0),ceil_mode=False),#MaxPool2d',
        '(AvgPool2d(kernel_size=2, stride=2, padding=0,(0, 0),ceil_mode=False),#AvgPool2d',
        '(Linear(128, 10, bias=True)),#Linear'
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
test_transform Ran
ran on a synthesized input
YBZh/EFDM/ArbitraryStyleTransfer/view.py
code served (permissive licence) · get_code("939a94cc6cecc770")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Compose. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torchvision import transforms

torch.manual_seed(0)

ARGS = {
    "size": 256,
    "crop": 224
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
videodata_kwargs Ran
ran on a synthesized input
YBZh/EFDM/DomainGeneralization/reid/default_config.py
code served (permissive licence) · get_code("977724699467d6ae")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class Config:
    def __init__(self):
        self.data = DataConfig()
        self.train = TrainConfig()
        self.test = TestConfig()
        self.sampler = SamplerConfig()
        self.video = VideoConfig()
        self.use_gpu = False

class DataConfig:
    def __init__(self):
        self.root = '/tmp/data'
        self.sources = ['source1', 'source2']
        self.targets = ['target1']
        self.height = 256
        self.width = 256
        self.transforms = None
        self.norm_mean = [0.485, 0.456, 0.406]
        self.norm_std = [0.229, 0.224, 0.225]
        self.split_id = 0
        self.combineall = False
        self.workers = 4

class TrainConfig:
    def __init__(self):
        self.batch_size = 32

class TestConfig:
    def __init__(self):
        self.batch_size = 16

class SamplerConfig:
    def __init__(self):
        self.num_instances = 4
        self.num_cams = 2
        self.train_sampler = 'RandomSampler'

class VideoConfig:
    def __init__(self):
        self.seq_len = 8
        self.sample_method = 'random'

cfg = Config()

ARGS = {
    'cfg': cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
init_pretrained_weights Not yet run
unverified (harvested, no recorded run)
YBZh/EFDM/DomainGeneralization/reid/models/osnet_db.py
pointer only (licence: MIT); the stored copy get_code serves, from MatthewAbugeja/osnet, is pointer only (licence: NONE) · get_code("bd41824b39412f93")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from MatthewAbugeja/osnet, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

osnet_x1_0 Not yet run
unverified (harvested, no recorded run)
YBZh/EFDM/DomainGeneralization/reid/models/osnet_db.py
code served (permissive licence) · get_code("7a3189c6c0125d89")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 9 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 6 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
compute_ci95 37 other papers
1 dated earlier, 1 the same month, 34 later, 1 undated
2106.00592 (2021-06)
Semi-Supervised Domain Generalization with Stochastic StyleMatch
2203.05557 (2022-03)
Conditional Prompt Learning for Vision-Language Models
2207.03111 (2022-07)
Masked Surfel Prediction for Self-Supervised Point Cloud Learning
and 34 more not named here
calc_mean_std 26 other papers
11 dated earlier, 12 later, 3 same year, order not determinable · 4 only as an assembly brick
1703.06868 (2017-03)
Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
1812.02342 (2018-12)
Arbitrary Style Transfer with Style-Attentional Networks
1911.10033 (2019-11)
Domain Adaptation for Object Detection via Style Consistency
and 23 more not named here
adaptive_instance_normalization 12 other papers
6 dated earlier, 5 later, 1 same year, order not determinable
1703.06868 (2017-03)
Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
1911.10033 (2019-11)
Domain Adaptation for Object Detection via Style Consistency
2003.08436 (2020-03)
Collaborative Distillation for Ultra-Resolution Universal Style Transfer
and 9 more not named here
init_pretrained_weights 4 other papers
4 dated earlier
1905.00953 (2019-05)
Omni-Scale Feature Learning for Person Re-Identification
1910.06827 (2019-10)
Learning Generalisable Omni-Scale Representations for Person Re-Identification
1910.10093 (2019-10)
Torchreid: A Library for Deep Learning Person Re-Identification in Pytorch
and 1 more not named here
optimizer_kwargs 4 other papers
3 dated earlier, 1 later
1910.10093 (2019-10)
Torchreid: A Library for Deep Learning Person Re-Identification in Pytorch
2010.05435 (2020-10)
Top-DB-Net: Top DropBlock for Activation Enhancement in Person Re-Identification
Zhao_PhD_Learning_Learning_With_Pompeiu-Hausdorff_Distances_for_Video-Based_Vehicle_Re-Identification_CVPR_2021_paper (2021 (year only))
PhD Learning: Learning with Pompeiu-hausdorff Distances for Video-based Vehicle Re-Identification
and 1 more not named here
osnet_x0_75 3 other papers
3 dated earlier
1905.00953 (2019-05)
Omni-Scale Feature Learning for Person Re-Identification
1910.06827 (2019-10)
Learning Generalisable Omni-Scale Representations for Person Re-Identification
1910.10093 (2019-10)
Torchreid: A Library for Deep Learning Person Re-Identification in Pytorch
osnet_x1_0 3 other papers
3 dated earlier
1905.00953 (2019-05)
Omni-Scale Feature Learning for Person Re-Identification
1910.06827 (2019-10)
Learning Generalisable Omni-Scale Representations for Person Re-Identification
1910.10093 (2019-10)
Torchreid: A Library for Deep Learning Person Re-Identification in Pytorch
simplify_source 2 other papers
2 later
2310.15171 (2023-10)
RoboDepth: Robust Out-of-Distribution Depth Estimation under Corruptions
2604.05616 (2026-04)
Evaluation of Randomization through Style Transfer for Enhanced Domain Generalization
lua_recursive_source 1 other paper
1 later
2604.05616 (2026-04)
Evaluation of Randomization through Style Transfer for Enhanced Domain Generalization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Arbitrary style transfer (AST) and domain generalization (DG) are important yet challenging visual learning tasks, which can be cast as a feature distribution matching problem. With the assumption of Gaussian feature distribution, conventional feature distribution matching methods usually match the mean and standard deviation of features. However, the feature distributions of real-world data are usually much more complicated than Gaussian, which cannot be accurately matched by using only the first-order and second-order statistics, while it is computationally prohibitive to use high-order statistics for distribution matching. In this work, we, for the first time to our best knowledge, propose to perform Exact Feature Distribution Matching (EFDM) by exactly matching the empirical Cumulative Distribution Functions (eCDFs) of image features, which could be implemented by applying the Exact Histogram Matching (EHM) in the image feature space. Particularly, a fast EHM algorithm, named Sort-Matching, is employed to perform EFDM in a plug-and-play manner with minimal cost. The effectiveness of our proposed EFDM method is verified on a variety of AST and DG tasks, demonstrating new state-of-the-art results. Codes are available at https://github.com/YBZh/EFDM .

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2203.07740")
get_code_for_paper("2203.07740")
have("2203.07740")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2203.07740.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2203.07740.svg)](https://syntology.ai/paper/2203.07740)

Connect an agent — have() is free.