SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.09441 · 2018

Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net

arXiv · PDF · Open in the Atlas

Code that ran

8 of 16 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 1 has no contract verdict; 6 failures of our instrument; 8 no recorded run), measured 2026-11-22; 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/1807.09441.json · badge: /api/ran/1807.09441.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
jihaoxuanye/MetaPRD community (classifier label)
classifier basis not recorded on the link
6 ran · 6 no recorded run
leeboomla/calr community (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
FunctionStatusWhere it lives
cm Ran
ran; our contract draft was wrong, not the code
leeboomla/calr/calr/models/cm.py
code served (permissive licence) · get_code("6018524d1dc8cbff")
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 float, shape (2, 3) 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
from torch import autograd, nn

torch.manual_seed(0)

# Create small tensors with distinct dimensions
batch_size = 2
feature_dim = 4
num_classes = 3

# inputs: shape (batch_size, feature_dim)
inputs = torch.randn(batch_size, feature_dim, requires_grad=True)

# indexes (targets): shape (batch_size,) with class indices
indexes = torch.tensor([0, 1], dtype=torch.long)

# features: shape (num_classes, feature_dim) - learnable feature vectors
features = torch.randn(num_classes, feature_dim)

# momentum: scalar value
momentum = 0.5

ARGS = {
    "inputs": inputs,
    "indexes": indexes,
    "features": features,
    "momentum": momentum
}
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 float, shape (2, 3) — shape (2, 3) 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
cm_hard Ran
ran; our contract draft was wrong, not the code
leeboomla/calr/calr/models/cm.py
code served (permissive licence) · get_code("f435cb7c43ec98ad")
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 float, shape (2, 3) 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 numpy as np
from torch import autograd, nn

torch.manual_seed(0)

# Set up tensor dimensions
batch_size = 2
feature_dim = 4
num_classes = 3

# Create inputs: batch of embeddings [batch_size, feature_dim]
inputs = torch.randn(batch_size, feature_dim, requires_grad=True)

# Create targets: class indices [batch_size]
indexes = torch.tensor([0, 1], dtype=torch.long)

# Create features: learnable class centers [num_classes, feature_dim]
features = torch.randn(num_classes, feature_dim)
features = features / features.norm(dim=1, keepdim=True)  # normalize

# Momentum parameter
momentum = 0.5

ARGS = {
    'inputs': inputs,
    'indexes': indexes,
    'features': features,
    'momentum': momentum
}
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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
jihaoxuanye/MetaPRD/mprd/models/resnet_ibn_a.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
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 lixiaotong97/DSU, 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. A run is recorded.

output_sim Ran
ran on a synthesized input
jihaoxuanye/MetaPRD/mprd/models/cm.py
code served (permissive licence) · get_code("6f4f409bf7d38cde")
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 float, shape (2, 3) 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)

# Parameters:
# - inputs: tensor that will be multiplied with protomemory tensors via .mm()
#   Shape: (B, D) where B is batch size, D is embedding dimension
# - pos_protomemory: tensor indexed by targets, then transposed for mm()
#   Shape: (num_classes, D)
# - neg_protomemory: tensor transposed for mm() with inputs
#   Shape: (num_classes, D)
# - targets: indices into pos_protomemory and used to index outputs
#   Shape: (B,) with values in range [0, num_classes)

B = 2  # batch size
D = 4  # embedding dimension
num_classes = 3  # number of classes/prototypes

inputs = torch.randn(B, D)
pos_protomemory = torch.randn(num_classes, D)
neg_protomemory = torch.randn(num_classes, D)
targets = torch.tensor([0, 2])

ARGS = {
    "inputs": inputs,
    "pos_protomemory": pos_protomemory,
    "neg_protomemory": neg_protomemory,
    "targets": targets,
}
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 float, shape (2, 3) — shape (2, 3) 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
pairwise_distance Ran
ran, honoured the contract we drafted
jihaoxuanye/MetaPRD/mprd/evaluators.py
code served (permissive licence) · get_code("b6d5887f94b1db25")
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 float, 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
import numpy as np

torch.manual_seed(0)

# Case 1: query=None and gallery=None
# The function expects features to be a dict where values() returns tensors
# that can be concatenated. n = len(features), and each tensor should be viewable as a vector.
features_dict = {
    'feat_0': torch.randn(4),  # 4-dim feature vector
    'feat_1': torch.randn(4),  # 4-dim feature vector
}

# Case 2: query and gallery are provided
# They are lists of tuples where each tuple is (feature_id, ..., ...)
# The function accesses features[f] for f being the first element of each tuple
query_list = [
    ('feat_0', 'label_0', 'cam_0'),
    ('feat_1', 'label_1', 'cam_1'),
]

gallery_list = [
    ('feat_0', 'label_0', 'cam_0'),
    ('feat_1', 'label_1', 'cam_1'),
]

# For the case with query and gallery, we need features dict with the feature ids
features_dict_case2 = {
    'feat_0': torch.randn(4),
    'feat_1': torch.randn(4),
}

# Test both cases by creating two different ARGS configurations
# We'll go with case 1 (query=None, gallery=None) as the primary setup
ARGS = {
    'features': features_dict,
    'query': None,
    'gallery': None,
}
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 Tensor, ndim 2, dtype family float, 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
process_dir Ran
ran; our contract draft was wrong, not the code
jihaoxuanye/MetaPRD/mprd/datasets/dukemtmcreid.py
code served (permissive licence) · get_code("7e822f939fbe184f")
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 list, ndim 2, 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 tempfile
import os

# Create a temporary directory with mock image files matching the expected pattern
temp_dir = tempfile.mkdtemp()

# Create some mock image files with names matching pattern: ([-\d]+)_c(\d)
mock_files = [
    "0001_c1.jpg",
    "0001_c2.jpg",
    "0002_c1.jpg",
    "0002_c3.jpg",
    "0003_c2.jpg",
    "-1_c1.jpg",  # This should be filtered out (pid == -1)
]

for fname in mock_files:
    fpath = os.path.join(temp_dir, fname)
    with open(fpath, 'w') as f:
        f.write("mock")

ARGS = {
    "dir_path": temp_dir,
    "relabel": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list 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
resnet101_ibn_a Ran
ran; our contract draft was wrong, not the code
jihaoxuanye/MetaPRD/mprd/models/resnet_ibn_a.py
code served (permissive licence) · get_code("c7f5d45660e6ec13")
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 ResNet. 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
import math

torch.manual_seed(0)

# Define ARGS dictionary with parameters for resnet101_ibn_a
ARGS = {
    'pretrained': False,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
resnet50_ibn_a Ran
ran; our contract draft was wrong, not the code
jihaoxuanye/MetaPRD/mprd/models/resnet_ibn_a.py
code served (permissive licence) · get_code("93cbdbc352d644d9")
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 ResNet. 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)

ARGS = {
    'pretrained': False,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
build_pooling_layer Not yet run
unverified (harvested, no recorded run)
jihaoxuanye/MetaPRD/mprd/models/pooling.py
code served (permissive licence) · get_code("5c5d2f6f3c01ba6c")
How it ran

no invocation recorded.

extract_cnn_feature Not yet run
unverified (harvested, no recorded run)
jihaoxuanye/MetaPRD/mprd/evaluators.py
code served (permissive licence) · get_code("fbb5efeed7ebfd09")
How it ran

no invocation recorded.

extract_features Not yet run
unverified (harvested, no recorded run)
jihaoxuanye/MetaPRD/mprd/evaluators.py
pointer only (licence: MIT); the stored copy get_code serves, from whbdmu/FOUS, is pointer only (licence: NONE) · get_code("962810c012a60817")
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 whbdmu/FOUS, 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.

extract_features Not yet run
unverified (harvested, no recorded run)
leeboomla/calr/calr/evaluators.py
code served (permissive licence) · get_code("c27e5ae68871b4b0")
How it ran

no invocation recorded.

extract_features_per_cam Not yet run
unverified (harvested, no recorded run)
leeboomla/calr/calr/evaluators.py
code served (permissive licence) · get_code("e1356bb973ace3a5")
How it ran

no invocation recorded.

g_b_backward Not yet run
unverified (harvested, no recorded run)
jihaoxuanye/MetaPRD/mprd/models/cm.py
code served (permissive licence) · get_code("d72cb851db043142")
How it ran

no invocation recorded.

g_backward Not yet run
unverified (harvested, no recorded run)
jihaoxuanye/MetaPRD/mprd/models/cm.py
code served (permissive licence) · get_code("cc1f6e8e2a858bb0")
How it ran

no invocation recorded.

label_generator_kmeans Not yet run
unverified (harvested, no recorded run)
jihaoxuanye/MetaPRD/mprd/models/kmeans.py
code served (permissive licence) · get_code("4560dc753fea5981")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 11 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 11 later) and 5 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
conv3x3 686 other papers
57 dated earlier, 5 the same month, 624 later · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
pairwise_distance 7 other papers
7 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 4 more not named here
cm 6 other papers
6 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 3 more not named here
extract_cnn_feature 6 other papers
6 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
aaai_19970 (2022 (year only))
SECRET: Self-Consistent Pseudo Label Refinement for Unsupervised Domain Adaptive Person Re-identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 3 more not named here
label_generator_kmeans 6 other papers
6 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 3 more not named here
build_pooling_layer 5 other papers
5 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 2 more not named here
resnet101_ibn_a 5 other papers
5 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 2 more not named here
resnet50_ibn_a 5 other papers
5 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 2 more not named here
extract_features 4 other papers
4 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 1 more not named here
cm_hard 3 other papers
3 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
aaai_28092 (2024 (year only))
Catalyst for Clustering-Based Unsupervised Object Re-identification: Feature Calibration
process_dir 3 other papers
3 later
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification

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-22.

Repositories linked to this paper

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

Abstract

Convolutional neural networks (CNNs) have achieved great successes in many computer vision problems. Unlike existing works that designed CNN architectures to improve performance on a single task of a single domain and not generalizable, we present IBN-Net, a novel convolutional architecture, which remarkably enhances a CNN's modeling ability on one domain (e.g. Cityscapes) as well as its generalization capacity on another domain (e.g. GTA5) without finetuning. IBN-Net carefully integrates Instance Normalization (IN) and Batch Normalization (BN) as building blocks, and can be wrapped into many advanced deep networks to improve their performances. This work has three key contributions. (1) By delving into IN and BN, we disclose that IN learns features that are invariant to appearance changes, such as colors, styles, and virtuality/reality, while BN is essential for preserving content related information. (2) IBN-Net can be applied to many advanced deep architectures, such as DenseNet, ResNet, ResNeXt, and SENet, and consistently improve their performance without increasing computational cost. (3) When applying the trained networks to new domains, e.g. from GTA5 to Cityscapes, IBN-Net achieves comparable improvements as domain adaptation methods, even without using data from the target domain. With IBN-Net, we won the 1st place on the WAD 2018 Challenge Drivable Area track, with an mIoU of 86.18%.

For agents

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

get_harvested_code_for_paper("1807.09441")
get_code_for_paper("1807.09441")
have("1807.09441")

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

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

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

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

Connect an agent — have() is free.