SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.06953 · 2017

Multi-style Generative Network for Real-time Transfer

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 6 failures of our instrument; 3 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/1703.06953.json · badge: /api/ran/1703.06953.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
zhanghang1989/PyTorch-Multi-Style-Transfer canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
habout632/gans community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
sonnguyentruong129/msgnet-tf community (classifier label)
classifier basis not recorded on the link
1 ran · 3 no recorded run
FunctionStatusWhere it lives
changeImageSize Ran
ran; our contract draft was wrong, not the code
habout632/gans/experiments/alpha_blend.py
code served (permissive licence) · get_code("9cf2bfef9d80375e")
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 Image. 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.

from PIL import Image
import torch

torch.manual_seed(0)

# Create a small test image
# The function accesses image.size[0] and image.size[1], so we need a PIL Image
# with width and height attributes
test_image = Image.new('RGB', (100, 80))  # width=100, height=80

ARGS = {
    'maxWidth': 50,
    'maxHeight': 40,
    'image': test_image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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_file_content Ran
ran; our contract draft was wrong, not the code
habout632/gans/experiments/body_analysis.py
code served (permissive licence) · get_code("df9236bc2d2e92d1")
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 bytes. 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 tempfile
import os

# Create a temporary file with some content
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=".txt")
temp_file.write(b"Hello, this is test file content!")
temp_file.close()

ARGS = {
    "filePath": temp_file.name
}
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 bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
gram_matrix Ran
ran; our contract draft was wrong, not the code
zhanghang1989/PyTorch-Multi-Style-Transfer/experiments/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from davidpengucf/SFDAHPE, is pointer only (licence: NONE) · get_code("430c582cd8bbb1df")
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 davidpengucf/SFDAHPE, 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.

images_to_vectors Ran
ran; our contract draft was wrong, not the code
habout632/gans/experiments/image_generation/gans/cgan.py
code served (permissive licence) · get_code("ab79b3af884cc927")
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, 12288) 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)

# The function expects a tensor with shape (batch_size, channels, height, width)
# where channels * height * width = 3 * 64 * 64 = 12288
# We'll use a small batch size of 2 with the correct channel/spatial dimensions
images = torch.randn(2, 3, 64, 64)

ARGS = {
    "images": images
}
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, 12288) — shape (2, 12288) 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
noise Ran
ran, honoured the contract we drafted
habout632/gans/experiments/image_generation/gans/cgan.py
code served (permissive licence) · get_code("2193a8e5441cfb68")
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, 100) as a later run recorded it. 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, 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)

ARGS = {
    'size': 2
}
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, 100) — shape (2, 100) 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
noise Ran
ran, honoured the contract we drafted
habout632/gans/experiments/image_generation/gans/dcgan.py
code served (permissive licence) · get_code("efb95cb76ecae277")
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, 100, 1, 1) as a later run recorded it. 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, 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)

# The function 'noise' takes a single parameter 'size' which is an integer
# It uses this size to create a tensor of shape (size, 100, 1, 1)
# So 'size' should be a small integer

ARGS = {
    "size": 2
}
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, 100, 1, 1) — shape (2, 100, 1, 1) 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
subtract_imagenet_mean_batch Ran
ran on a synthesized input
zhanghang1989/PyTorch-Multi-Style-Transfer/experiments/utils.py
code served (permissive licence) · get_code("e1a6917dbeb17928")
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, 3, 4, 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
from torch.autograd import Variable

torch.manual_seed(0)

# Create a batch of BGR images
# batch size: 2, channels: 3 (BGR), height: 4, width: 5
batch = Variable(torch.randn(2, 3, 4, 5))

ARGS = {
    "batch": batch
}
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, 3, 4, 5) — shape (2, 3, 4, 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
subtract_imagenet_mean_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sonnguyentruong129/msgnet-tf/src/utils.py
code served (permissive licence) · get_code("965868f762794fb3")
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, 3, 4, 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)

# Create a small batch of BGR images
# Shape: (batch, channels, height, width) = (2, 3, 4, 4)
X = torch.randn(2, 3, 4, 4, dtype=torch.float32)

ARGS = {
    "X": X
}
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, 3, 4, 4) — shape (2, 3, 4, 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
tensor_load_rgbimage Ran
ran on a synthesized input
zhanghang1989/PyTorch-Multi-Style-Transfer/experiments/utils.py
code served (permissive licence) · get_code("78fe823d313a3349")
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 3, dtype family float, shape (3, 4, 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 PIL import Image
import io

torch.manual_seed(0)

# Create a minimal test image in memory
def create_test_image():
    # Create a small RGB image (4x3 pixels)
    img_array = np.random.randint(0, 256, (3, 4, 3), dtype=np.uint8)
    img = Image.fromarray(img_array.transpose(1, 2, 0), 'RGB')
    # Save to bytes buffer
    buffer = io.BytesIO()
    img.save(buffer, format='PNG')
    buffer.seek(0)
    return buffer

# Create a temporary file-like object
image_buffer = create_test_image()

# We need an actual file path, so create a temporary file
import tempfile
temp_file = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
temp_file.write(image_buffer.getvalue())
temp_file.close()

ARGS = {
    'filename': temp_file.name,
    'size': None,
    'scale': None,
    'keep_asp': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, 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 3, dtype family float, shape (3, 4, 3) — shape (3, 4, 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
var Ran
ran on a synthesized input
zhanghang1989/PyTorch-Multi-Style-Transfer/experiments/net.py
code served (permissive licence) · get_code("e837b13c9b1af4be")
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 1, dtype family float, shape (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)

# Create a small tensor for testing
# Shape: (2, 4) - batch of 2, dimension of 4
x = torch.randn(2, 4)

# The function uses:
# - x.mean(dim) to compute mean along a dimension
# - .expand_as(x) to expand the mean to match x's shape
# - .pow(2) to square elements
# - .mean(dim) to compute mean along a dimension
# All of these are standard tensor operations, so we just need a valid tensor and dim parameter

ARGS = {
    "x": x,
    "dim": 0
}
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 1, dtype family float, shape (4,) — shape (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
vectors_to_images Ran
ran; our contract draft was wrong, not the code
habout632/gans/experiments/image_generation/gans/cgan.py
code served (permissive licence) · get_code("705b6d49a7b01d24")
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, 3, 64, 64) 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)

n_channels = 3
width = 64
height = 64

def vectors_to_images(vectors):
    return vectors.view(vectors.size(0), n_channels, width, height)

# Create a tiny tensor with shape (batch_size, flattened_features)
# The function reshapes it to (batch_size, n_channels, width, height)
# So the flattened dimension should be n_channels * width * height
batch_size = 2
flattened_dim = n_channels * width * height
vectors = torch.randn(batch_size, flattened_dim)

ARGS = {
    "vectors": vectors
}
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, 3, 64, 64) — shape (2, 3, 64, 64) 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
gram_matrix Not yet run
unverified (harvested, no recorded run)
sonnguyentruong129/msgnet-tf/src/model.py
code served (permissive licence) · get_code("47971a1f1e6da2cb")
How it ran

no invocation recorded.

gram_matrix Not yet run
unverified (harvested, no recorded run)
sonnguyentruong129/msgnet-tf/src/utils.py
code served (permissive licence) · get_code("61276bec12947112")
How it ran

no invocation recorded.

tensor_load_rgbimage Not yet run
unverified (harvested, no recorded run)
sonnguyentruong129/msgnet-tf/src/utils.py
code served (permissive licence) · get_code("b8fc24f7c2aa7558")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 later) and 10 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
gram_matrix 9 other papers
3 dated earlier, 6 later
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1607.08022 (2016-07)
Instance Normalization: The Missing Ingredient for Fast Stylization
and 6 more not named here
subtract_imagenet_mean_batch 1 other paper
1 later
1906.11129 (2019-06)
Uncertainty Guided Multi-Scale Residual Learning-using a Cycle Spinning CNN for Single Image De-Raining
tensor_load_rgbimage 1 other paper
1 later
1906.11129 (2019-06)
Uncertainty Guided Multi-Scale Residual Learning-using a Cycle Spinning CNN for Single Image De-Raining

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

Despite the rapid progress in style transfer, existing approaches using feed-forward generative network for multi-style or arbitrary-style transfer are usually compromised of image quality and model flexibility. We find it is fundamentally difficult to achieve comprehensive style modeling using 1-dimensional style embedding. Motivated by this, we introduce CoMatch Layer that learns to match the second order feature statistics with the target styles. With the CoMatch Layer, we build a Multi-style Generative Network (MSG-Net), which achieves real-time performance. We also employ an specific strategy of upsampled convolution which avoids checkerboard artifacts caused by fractionally-strided convolution. Our method has achieved superior image quality comparing to state-of-the-art approaches. The proposed MSG-Net as a general approach for real-time style transfer is compatible with most existing techniques including content-style interpolation, color-preserving, spatial control and brush stroke size control. MSG-Net is the first to achieve real-time brush-size control in a purely feed-forward manner for style transfer. Our implementations and pre-trained models for Torch, PyTorch and MXNet frameworks will be publicly available.

For agents

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

get_harvested_code_for_paper("1703.06953")
get_code_for_paper("1703.06953")
have("1703.06953")

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

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

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

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

Connect an agent — have() is free.