SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1907.04312 · 2019

Positional Normalization

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 7 failures of our instrument; 1 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/1907.04312.json · badge: /api/ran/1907.04312.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
Boyiliee/PONO canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
MS Ran
ran on a synthesized input
Boyiliee/PONO/pono_ms_tf.py
code served (permissive licence) · get_code("18ece9f8a7dbbe14")
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, 4) 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)

# Construct arguments for MS(x, beta, gamma)
# The function performs: x * gamma + beta
# All parameters should be tensors of compatible shapes for broadcasting

x = torch.randn(2, 4)  # batch size 2, dimension 4
beta = torch.randn(4)  # shape (4,) for broadcasting
gamma = torch.randn(4)  # shape (4,) for broadcasting

ARGS = {
    "x": x,
    "beta": beta,
    "gamma": gamma,
}
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, 4) — shape (2, 4) 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
PONO Ran
ran on a synthesized input
Boyiliee/PONO/pono_ms_torch.py
code served (permissive licence) · get_code("4b7646d7e6bc61de")
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 tuple. 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

torch.manual_seed(0)

# Construct arguments for PONO function
# x: input tensor with shape (batch_size, feature_dim)
# The function operates on dim=1, so we need at least 2 dimensions
x = torch.randn(2, 4)  # batch_size=2, feature_dim=4

epsilon = 1e-05

ARGS = {
    "x": x,
    "epsilon": epsilon,
}
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 tuple — a tuple output has no array shape of its own; none is 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
convMeanpool Ran
ran; our contract draft was wrong, not the code
Boyiliee/PONO/pytorch-DRIT-PONO-MS/src/networks_pono.py
pointer only (licence: MIT); the stored copy get_code serves, from HsinYingLee/DRIT, is pointer only (licence: NONE) · get_code("ac9996943f2e1621")
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 HsinYingLee/DRIT, 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.

get_norm_layer Ran
ran; our contract draft was wrong, not the code
Boyiliee/PONO/pytorch-CycleGAN-and-pix2pix-with-PONO/networks_pono.py
code served (permissive licence) · get_code("502526bb047c68fc")
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 partial. 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 functools

torch.manual_seed(0)

class Identity(nn.Module):
    def forward(self, x):
        return x

def get_norm_layer(norm_type='instance'):
    """Return a normalization layer
    Parameters:
        norm_type (str) -- the name of the normalization layer: batch | instance | none
    For BatchNorm, we use learnable affine parameters and track running statistics (mean/stddev).
    For InstanceNorm, we do not use learnable affine parameters. We do not track running statistics.
    """
    if norm_type == 'batch':
        norm_layer = functools.partial(nn.BatchNorm2d, affine=True, track_running_stats=True)
    elif norm_type == 'instance':
        norm_layer = functools.partial(nn.InstanceNorm2d, affine=False, track_running_stats=False)
    elif norm_type == 'none':
        norm_layer = lambda x: Identity()
    else:
        raise NotImplementedError('normalization layer [%s] is not found' % norm_type)
    return norm_layer

ARGS = {
    'norm_type': 'instance'
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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
get_scheduler Ran
ran; our contract draft was wrong, not the code
Boyiliee/PONO/pytorch-DRIT-PONO-MS/src/networks_pono.py
pointer only (licence: MIT); the stored copy get_code serves, from HsinYingLee/DRIT, is pointer only (licence: NONE) · get_code("fcd2cbd6dab69214")
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 HsinYingLee/DRIT, 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.

get_scheduler Ran
ran; our contract draft was wrong, not the code
Boyiliee/PONO/pytorch-CycleGAN-and-pix2pix-with-PONO/networks_pono.py
code served (permissive licence) · get_code("07969c6a497f5752")
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 LambdaLR. 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 torch.optim import Adam

torch.manual_seed(0)

# Create a minimal model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create optimizer
model = SimpleModel()
optimizer = Adam(model.parameters(), lr=0.001)

# Create options class
class Options:
    def __init__(self, lr_policy='linear'):
        self.lr_policy = lr_policy
        self.epoch_count = 0
        self.niter = 100
        self.niter_decay = 100
        self.lr_decay_iters = 10

# Test with 'linear' policy
opt = Options(lr_policy='linear')

ARGS = {
    'optimizer': optimizer,
    'opt': opt
}
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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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_net Ran
ran; our contract draft was wrong, not the code
Boyiliee/PONO/pytorch-CycleGAN-and-pix2pix-with-PONO/networks_pono.py
code served (permissive licence) · get_code("61b04019af0dc257")
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 SimpleNet. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn import init

torch.manual_seed(0)

# Create a simple network with Conv2d, Linear, and BatchNorm2d layers
class SimpleNet(nn.Module):
    def __init__(self):
        super(SimpleNet, self).__init__()
        self.conv1 = nn.Conv2d(3, 4, kernel_size=3, padding=1)
        self.bn1 = nn.BatchNorm2d(4)
        self.linear1 = nn.Linear(4, 2)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        return x

# Instantiate the network
net = SimpleNet()

# Define ARGS dictionary with all parameters for init_net
ARGS = {
    'net': net,
    'init_type': 'normal',
    'init_gain': 0.02,
    'gpu_ids': []
}
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 SimpleNet — a SimpleNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleNet 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
l2normalize Ran
ran; our contract draft was wrong, not the code
Boyiliee/PONO/pytorch-MUNIT-PONO-MS/networks_pono.py
pointer only (licence: MIT); the stored copy get_code serves, from xxxliu95/RA_FA_Cardiac, is pointer only (licence: NONE) · get_code("bedff51745d2cf84")
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 xxxliu95/RA_FA_Cardiac, 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.

meanpoolConv Ran
ran; our contract draft was wrong, not the code
Boyiliee/PONO/pytorch-DRIT-PONO-MS/src/networks_pono.py
pointer only (licence: MIT); the stored copy get_code serves, from HsinYingLee/DRIT, is pointer only (licence: NONE) · get_code("623150b77cda933f")
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 HsinYingLee/DRIT, 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.

tensor2img Ran
ran on a synthesized input
Boyiliee/PONO/pytorch-DRIT-PONO-MS/src/saver.py
code served (permissive licence) · get_code("2b790bb56bc080e6")
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 ndarray, ndim 3, dtype family int, shape (4, 3, 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

torch.manual_seed(0)

# The function expects a tensor that:
# - Can be indexed with [0] to get the first element
# - Has a .cpu() method
# - Has a .float() method
# - Has a .numpy() method
# - Has a .shape attribute with at least 3 dimensions (channels, height, width)

# Create a tensor with shape (batch=2, channels=1, height=4, width=3)
# The function takes img[0], so we need at least batch dimension
img_tensor = torch.randn(2, 1, 4, 3)

ARGS = {
    "img": img_tensor
}
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 ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
PONO Not yet run
unverified (harvested, no recorded run)
Boyiliee/PONO/pono_ms_tf.py
code served (permissive licence) · get_code("904fe113df07c315")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 7 later) and 4 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
l2normalize 27 other papers
7 dated earlier, 20 later · 2 only as an assembly brick
1703.09452 (2017-03)
SEGAN: Speech Enhancement Generative Adversarial Network
1802.05957 (2018-02)
Spectral Normalization for Generative Adversarial Networks
1806.03589 (2018-06)
Free-Form Image Inpainting with Gated Convolution
and 24 more not named here
init_net 14 other papers
3 dated earlier, 11 later
1406.2661 (2014-06)
Generative Adversarial Networks
1511.06434 (2015-11)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
and 11 more not named here
get_scheduler 11 other papers
2 dated earlier, 9 later
1406.2661 (2014-06)
Generative Adversarial Networks
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1910.13049 (2019-10)
Category Anchor-Guided Unsupervised Domain Adaptation for Semantic Segmentation
and 8 more not named here
get_norm_layer 8 other papers
2 dated earlier, 6 later
1406.2661 (2014-06)
Generative Adversarial Networks
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1911.13239 (2019-11)
DoveNet: Deep Image Harmonization via Domain Verification
and 5 more not named here
meanpoolConv 2 other papers
2 later · 1 only as an assembly brick
2104.05170 (2021-04)
Memory-guided Unsupervised Image-to-image Translation
2308.00376 (2023-08)
Deep Image Harmonization with Learnable Augmentation
convMeanpool 1 other paper
1 later
2104.05170 (2021-04)
Memory-guided Unsupervised Image-to-image Translation
get_scheduler 1 other paper
1 later
2104.05170 (2021-04)
Memory-guided Unsupervised Image-to-image Translation

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

A popular method to reduce the training time of deep neural networks is to normalize activations at each layer. Although various normalization schemes have been proposed, they all follow a common theme: normalize across spatial dimensions and discard the extracted statistics. In this paper, we propose an alternative normalization method that noticeably departs from this convention and normalizes exclusively across channels. We argue that the channel dimension is naturally appealing as it allows us to extract the first and second moments of features extracted at a particular image position. These moments capture structural information about the input image and extracted features, which opens a new avenue along which a network can benefit from feature normalization: Instead of disregarding the normalization constants, we propose to re-inject them into later layers to preserve or transfer structural information in generative networks. Codes are available at https://github.com/Boyiliee/PONO.

For agents

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

get_harvested_code_for_paper("1907.04312")
get_code_for_paper("1907.04312")
have("1907.04312")

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

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

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

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

Connect an agent — have() is free.