SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1704.00028 · NeurIPS · 2017

Improved Training of Wasserstein GANs

Ishaan Gulrajani, Aaron Courville, Vincent Dumoulin, Faruk Ahmed, Martin Arjovsky

arXiv · PDF · Open in the Atlas

Code that ran

27 of 49 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (10 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 18 have no contract verdict; 8 failures of our instrument; 22 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/1704.00028.json · badge: /api/ran/1704.00028.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
unicredit/ganzo community
not in the paper's declared repositories
4 ran · 0 no recorded run
polmonroig/faceGAN community
not in the paper's declared repositories
3 ran · 0 no recorded run
dylanell/wasserstein-gan community
not in the paper's declared repositories
2 ran · 2 no recorded run
SimoneDutto/EDSR community
Papers with Code archive
2 ran · 0 no recorded run
bigmao8576/WGAN-GP-Tensorflow2 community
not in the paper's declared repositories
2 ran · 0 no recorded run
itsuki8914/wgan-gp-TensorFlow community
not in the paper's declared repositories
1 ran · 4 no recorded run
shahbuland/basic-gans community
not in the paper's declared repositories
1 ran · 1 no recorded run
zeleni9/pytorch-wgan community
not in the paper's declared repositories
1 ran · 1 no recorded run
mbarbetti/tf-gen-models community
not in the paper's declared repositories
1 ran · 1 no recorded run
MaximeVandegar/Papers-in-100-Lines-of-Code community
not in the paper's declared repositories
1 ran · 1 no recorded run
dylanell/conditional-wgan community
not in the paper's declared repositories
1 ran · 0 no recorded run
lonce/sonyGanFork community
not in the paper's declared repositories
1 ran · 0 no recorded run
ChristophReich1996/Mode_Collapse community
not in the paper's declared repositories
1 ran · 0 no recorded run
catalyst-team/gan community
not in the paper's declared repositories
1 ran · 0 no recorded run
joshpc/StyledFontGAN community
not in the paper's declared repositories
1 ran · 0 no recorded run
goldhuang/SRGAN-PyTorch community
not in the paper's declared repositories
1 ran · 0 no recorded run
snow-mn/GAN-INT-CLS community
not in the paper's declared repositories
1 ran · 0 no recorded run
spandan2/Wgan-GP_cats community
not in the paper's declared repositories
1 ran · 0 no recorded run
LynnHo/DCGAN-LSGAN-WGAN-WGAN-GP-Tensorflow community
Papers with Code archive
1 ran · 0 no recorded run
YuguangTong/improved_wgan_training community
Papers with Code archive
0 ran · 2 no recorded run
tensorpack/tensorpack community
not in the paper's declared repositories
0 ran · 2 no recorded run
ydataai/ydata-synthetic community
not in the paper's declared repositories
0 ran · 2 no recorded run
changwoolee/WGAN-GP-tensorflow community
not in the paper's declared repositories
0 ran · 1 no recorded run
dabsdamoon/Anime-Colorization-v0.2 community
not in the paper's declared repositories
0 ran · 1 no recorded run
ChristophReich1996/Dirac-GAN community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
CNN Ran
ran on a synthesized input
dylanell/wasserstein-gan/model/wasserstein_gan.py
pointer only (licence: NONE) · get_code("0ec8f070b436bb82")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dylanell/wasserstein-gan 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.

Critic Ran
ran on a synthesized input · constructed an object; no result was computed
dylanell/conditional-wgan/conditional_gan/modules.py
pointer only (licence: NONE) · get_code("0faeeae133c3fe8e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dylanell/conditional-wgan 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.

Discriminator Ran
ran on a synthesized input · constructed an object; no result was computed
shahbuland/basic-gans/GP-WGAN-pytorch.py
pointer only (licence: NONE) · get_code("3baa46870ebaf2e7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, shahbuland/basic-gans 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.

Discriminator Ran
ran on a synthesized input · constructed an object; no result was computed
zeleni9/pytorch-wgan/models/wgan_gradient_penalty.py
code served (permissive licence) · get_code("1574ea170dc9603e")
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 an instance of its own class, Discriminator: the run constructed the object and did not call it, so no result was computed. 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 Discriminator.__init__ takes only one parameter: channels
# This should be an integer representing the number of input channels
# Based on the forward method, it expects input tensors with shape (batch, channels, height, width)
# The first Conv2d layer expects in_channels=channels

ARGS = {
    'channels': 3
}
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 Discriminator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Discriminator 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
Discriminator Ran
ran on a synthesized input · constructed an object; no result was computed
polmonroig/faceGAN/models/WGAN/WGAN.py
code served (permissive licence) · get_code("4c30b6ec62e2cafa")
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 an instance of its own class, Discriminator: the run constructed the object and did not call it, so no result was computed. 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 = {
    'n_channels': 3,
    'imsize': 64,
}
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 Discriminator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Discriminator 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
GAN Ran
ran on a synthesized input · constructed an object; no result was computed
mbarbetti/tf-gen-models/tf_gen_models/algorithms/gan/WGAN_GP.py
code served (permissive licence) · get_code("ca66ddb9527ba712")
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 an instance of its own class, GAN: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
import numpy as np

# Create a simple generator model
generator = tf.keras.Sequential([
    tf.keras.layers.Dense(16, input_shape=(128,)),
    tf.keras.layers.Dense(8),
    tf.keras.layers.Dense(12)  # output shape will be (batch, 12)
])

# Create a simple discriminator model
discriminator = tf.keras.Sequential([
    tf.keras.layers.Dense(8, input_shape=(12,)),
    tf.keras.layers.Dense(1)
])

# Build models to set output_shape
generator.build((None, 128))
discriminator.build((None, 12))

# Create optimizers
g_optimizer = tf.keras.optimizers.Adam(learning_rate=0.0002)
d_optimizer = tf.keras.optimizers.Adam(learning_rate=0.0002)

ARGS = {
    'generator': generator,
    'discriminator': discriminator,
    'input_shape': None,
    'output_shape': None,
    'latent_dim': 128
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GAN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GAN 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
Generator Ran
ran on a synthesized input · constructed an object; no result was computed
polmonroig/faceGAN/models/WGAN/WGAN.py
code served (permissive licence) · get_code("5d714c6e5dfd6843")
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 an instance of its own class, Generator: the run constructed the object and did not call it, so no result was computed. 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 Generator(nn.Module):

    def __init__(self, latent_size, n_channels, imsize):
        super(Generator, self).__init__()
        self.net = nn.Sequential(nn.ConvTranspose2d(latent_size, imsize * 8, kernel_size=4, stride=1, padding=1), nn.BatchNorm2d(imsize * 8), nn.ReLU(True), nn.ConvTranspose2d(imsize * 8, imsize * 4, kernel_size=4, stride=2, padding=1), nn.BatchNorm2d(imsize * 4), nn.ReLU(True), nn.ConvTranspose2d(imsize * 4, imsize * 4, kernel_size=4, stride=2, padding=1), nn.BatchNorm2d(imsize * 4), nn.ReLU(True), nn.ConvTranspose2d(imsize * 4, imsize * 2, kernel_size=4, stride=2, padding=1), nn.BatchNorm2d(imsize * 2), nn.ReLU(True), nn.ConvTranspose2d(imsize * 2, imsize, kernel_size=4, stride=2, padding=1), nn.BatchNorm2d(imsize), nn.ReLU(True), nn.ConvTranspose2d(imsize, n_channels, kernel_size=4, stride=2, padding=1), nn.Tanh())

    def forward(self, input):
        return self.net(input)

ARGS = {
    'latent_size': 8,
    'n_channels': 3,
    'imsize': 16
}
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 Generator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Generator 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
Registry Ran
ran on a synthesized input
unicredit/ganzo/src/loss.py
code served (permissive licence) · get_code("1211de6102f39af9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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 collections import defaultdict

class RegistryError(ValueError):
    pass

class Registry:
    _available = defaultdict(dict)
    _defaults = dict()
    _option_functions = []

    @staticmethod
    def add(namespace, name, cls):
        Registry._available[namespace][name] = cls

    @staticmethod
    def keys(namespace):
        return list(Registry._available[namespace].keys())

    @staticmethod
    def get(namespace, name):
        return Registry._available[namespace].get(name)

    @staticmethod
    def set_default(namespace, name):
        if namespace in Registry._defaults:
            raise RegistryError(f'namespace {namespace} already has a default: {Registry._defaults[namespace]}')
        Registry._defaults[namespace] = name

    @staticmethod
    def default(namespace):
        return Registry._defaults.get(namespace)

    @staticmethod
    def add_option_function(f):
        Registry._option_functions.append(f)

    @staticmethod
    def option_functions():
        return list(Registry._option_functions)


INIT_ARGS = {}

ARGS = {
    'namespace': 'model_types',
    'name': 'transformer',
    'cls': type('DummyModel', (), {})
}

METHOD = 'add'

registry = Registry(**INIT_ARGS)
registry.add(**ARGS)

keys_result = Registry.keys('model_types')
print(f"Keys in 'model_types': {keys_result}")

get_result = Registry.get('model_types', 'transformer')
print(f"Retrieved class: {get_result}")

def dummy_option_func():
    return "option"

Registry.add_option_function(dummy_option_func)
print(f"Option functions: {Registry.option_functions()}")

Registry.set_default('model_types', 'transformer')
default_result = Registry.default('model_types')
print(f"Default for 'model_types': {default_result}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RegistryError Ran
ran on a synthesized input · constructed an object; no result was computed
unicredit/ganzo/src/loss.py
code served (permissive licence) · get_code("118386abde232ad1")
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 an instance of its own class, RegistryError: the run constructed the object and did not call it, so no result was computed. 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

class RegistryError(ValueError):
    pass

ARGS = {}
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 RegistryError — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RegistryError 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
SpatialGradient Ran
ran on a synthesized input
SimoneDutto/EDSR/src/loss/WMSE.py
code served (permissive licence) · get_code("2b2279cf4c0b7a8a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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
import torch.nn.functional as F

def _get_sobel_kernel_3x3() -> torch.Tensor:
    """Utility function that returns a sobel kernel of 3x3"""
    return torch.tensor([[-1.0, 0.0, 1.0], [-2.0, 0.0, 2.0], [-1.0, 0.0, 1.0]])

class SpatialGradient(nn.Module):
    """Computes the first order image derivative in both x and y using a Sobel
    operator.

    Return:
        torch.Tensor: the sobel edges of the input feature map.

    Shape:
        - Input: :math:`(B, C, H, W)`
        - Output: :math:`(B, C, 2, H, W)`

    Examples:
        >>> input = torch.rand(1, 3, 4, 4)
        >>> output = kornia.filters.SpatialGradient()(input)  # 1x3x2x4x4
    """

    def __init__(self) -> None:
        super(SpatialGradient, self).__init__()
        self.kernel: torch.Tensor = self.get_sobel_kernel()

    @staticmethod
    def get_sobel_kernel() -> torch.Tensor:
        kernel_x: torch.Tensor = _get_sobel_kernel_3x3()
        kernel_y: torch.Tensor = kernel_x.transpose(0, 1)
        return torch.stack([kernel_x, kernel_y])

    def forward(self, input: torch.Tensor) -> torch.Tensor:
        if not torch.is_tensor(input):
            raise TypeError('Input type is not a torch.Tensor. Got {}'.format(type(input)))
        if not len(input.shape) == 4:
            raise ValueError('Invalid input shape, we expect BxCxHxW. Got: {}'.format(input.shape))
        b, c, h, w = input.shape
        tmp_kernel: torch.Tensor = self.kernel.to(input.device).to(input.dtype)
        kernel: torch.Tensor = tmp_kernel.repeat(c, 1, 1, 1, 1)
        kernel_flip: torch.Tensor = kernel.flip(-3)
        return F.conv3d(input[:, :, None], kernel_flip, padding=1, groups=c)

INIT_ARGS = {}

ARGS = {
    "input": torch.randn(2, 3, 8, 6)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 5, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
TransposeCNN Ran
ran on a synthesized input
dylanell/wasserstein-gan/model/wasserstein_gan.py
pointer only (licence: NONE) · get_code("7eb6570e1d44fd51")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dylanell/wasserstein-gan 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.

WGAN Ran
ran on a synthesized input · constructed an object; no result was computed
polmonroig/faceGAN/models/WGAN/WGAN.py
code served (permissive licence) · get_code("880e09007bbd86e5")
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 an instance of its own class, WGAN: the run constructed the object and did not call it, so no result was computed. 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.utils.data import DataLoader, TensorDataset
import tempfile

torch.manual_seed(0)

# Create a tiny synthetic dataset
batch_size = 2
n_channels = 3
imsize = 64
image_height = 64
image_width = 64

# Create small dummy images and labels
images = torch.randn(4, n_channels, image_height, image_width)
labels = torch.randint(0, 10, (4,))
dataset = TensorDataset(images, labels)
dataloader = DataLoader(dataset, batch_size=batch_size, shuffle=True)

# Create a temporary directory for saving
save_dir = tempfile.mkdtemp()

# Device setup (CPU only)
device = torch.device('cpu')

ARGS = {
    'device': device,
    'save_dir': save_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type WGAN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a WGAN 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
WGANGPGradientPenalty Ran
ran; our contract draft was wrong, not the code
lonce/sonyGanFork/pg_gan/gradient_losses.py
pointer only (licence: NONE) · get_code("0b8b1f3450493cad")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lonce/sonyGanFork 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.

WGANGPLoss Ran
ran on a synthesized input · constructed an object; no result was computed
unicredit/ganzo/src/loss.py
code served (permissive licence) · get_code("6dbc8747d0edf6a9")
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 an instance of its own class, WGANGPLoss: the run constructed the object and did not call it, so no result was computed. 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 collections import defaultdict

torch.manual_seed(0)

# Define a minimal discriminator that the loss function will call
class MinimalDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4 * 3 * 5 * 6, 1)
    
    def forward(self, x):
        batch_size = x.size(0)
        x = x.view(batch_size, -1)
        return self.linear(x)

# Define a minimal options object with required attributes
class Options:
    def __init__(self):
        self.device = 'cpu'
        self.gradient_penalty_factor = 10.0

# Create instances
options = Options()
discriminator = MinimalDiscriminator()

# Create sample tensors with distinct dimensions
# batch_size=2, colors=4, width=3, height=5
real_data = torch.randn(2, 4, 3, 5, requires_grad=True)
fake_data = torch.randn(2, 4, 3, 5, requires_grad=True)

ARGS = {
    'options': options,
    'discriminator': discriminator
}
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 WGANGPLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a WGANGPLoss 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
WassersteinGANLossGPDiscriminator Ran
ran on a synthesized input
ChristophReich1996/Mode_Collapse/loss.py
code served (permissive licence) · get_code("355747b27841a53b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import torch.nn as nn

# Simple discriminator for testing
class SimpleDiscriminator(nn.Module):
    def __init__(self, input_dim=8):
        super().__init__()
        self.net = nn.Sequential(
            nn.Linear(input_dim, 16),
            nn.LeakyReLU(0.2),
            nn.Linear(16, 1)
        )
    
    def forward(self, x):
        return self.net(x)

# Create discriminator instance
discriminator = SimpleDiscriminator(input_dim=8)

# Create real and fake samples
batch_size = 2
feature_dim = 8

real_samples = torch.randn(batch_size, feature_dim)
fake_samples = torch.randn(batch_size, feature_dim)

# Get discriminator predictions
with torch.no_grad():
    discriminator_prediction_real = discriminator(real_samples)
    discriminator_prediction_fake = discriminator(fake_samples)

# Make predictions require grad for the loss computation
discriminator_prediction_real = discriminator(real_samples)
discriminator_prediction_fake = discriminator(fake_samples)

INIT_ARGS = {}

ARGS = {
    'discriminator_prediction_real': discriminator_prediction_real,
    'discriminator_prediction_fake': discriminator_prediction_fake,
    'discriminator': discriminator,
    'real_samples': real_samples,
    'fake_samples': fake_samples,
    'lambda_gradient_penalty': 2.0
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 0, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
WassersteinLossDiscriminator Ran
ran on a synthesized input
catalyst-team/gan/catalyst_gan/nn/criterion/wasserstein.py
code served (permissive licence) · get_code("de7b7d62cd6320f4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
from torch import nn

# INIT_ARGS for WassersteinLossDiscriminator
INIT_ARGS = {}

# ARGS for forward method
fake_logits = torch.randn(2, 4)  # batch 2, feature dim 4
real_logits = torch.randn(2, 4)  # batch 2, feature dim 4
ARGS = {
    "fake_logits": fake_logits,
    "real_logits": real_logits
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 0, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_conv2d Ran
ran; our contract draft was wrong, not the code
itsuki8914/wgan-gp-TensorFlow/model.py
pointer only (licence: NONE) · get_code("688218e8a8429c4e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, itsuki8914/wgan-gp-TensorFlow 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_sobel_kernel_3x3 Ran
ran on a synthesized input
SimoneDutto/EDSR/src/loss/WMSE.py
code served (permissive licence) · get_code("dbe8774da55540af")
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; 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

torch.manual_seed(0)

ARGS = {}
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 — no output shape is stated: observe_signature.py could not observe it (no_inputs)
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
calculate_gradient_penalty Ran
ran; our contract draft was wrong, not the code
joshpc/StyledFontGAN/models/loss.py
code served (permissive licence) · get_code("86e942c662b837d6")
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 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 torch
import torch.nn as nn
from torch.autograd import grad as torch_grad

torch.manual_seed(0)

# Define a simple discriminator model
class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super(SimpleDiscriminator, self).__init__()
        self.conv1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.conv2 = nn.Conv2d(8, 1, kernel_size=3, padding=1)
    
    def forward(self, x):
        x = torch.relu(self.conv1(x))
        x = self.conv2(x)
        return x

# Create discriminator
D = SimpleDiscriminator()

# Set up batch size and data dimensions
batch_size = 2
channels = 3
height = 4
width = 4

# Create real and generated data tensors
real_data = torch.randn(batch_size, channels, height, width)
generated_data = torch.randn(batch_size, channels, height, width)

# Set data type
data_type = torch.float32

# Gradient penalty weight
gradient_penalty_weight = 10.0

# Losses dictionary to track gradient norms
losses = {'gradient_norm': []}

# Construct ARGS dictionary
ARGS = {
    'D': D,
    'real_data': real_data,
    'generated_data': generated_data,
    'batch_size': batch_size,
    'gradient_penalty_weight': gradient_penalty_weight,
    'losses': losses,
    'data_type': data_type
}
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 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (no_result)
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_gradient_penalty Ran
ran; our contract draft was wrong, not the code
goldhuang/SRGAN-PyTorch/model.py
pointer only (licence: NONE) · get_code("8ad87c2d347e436c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goldhuang/SRGAN-PyTorch 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.

discriminator Ran
ran on a synthesized input · constructed an object; no result was computed
snow-mn/GAN-INT-CLS/models/wgan.py
pointer only (licence: GPL-3.0) · get_code("be8c52d2d8f0b336")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, snow-mn/GAN-INT-CLS, is not in the permissive set Syntology serves inline. 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.

gradient_penalty Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bigmao8576/WGAN-GP-Tensorflow2/WGAN_GP_mask.py
pointer only (licence: NONE) · get_code("86a6bb90b9961d27")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bigmao8576/WGAN-GP-Tensorflow2 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.

gradient_penalty Ran
ran; our contract draft was wrong, not the code
spandan2/Wgan-GP_cats/wgan-gp.py
pointer only (licence: NONE) · get_code("e7dcf2e7ee3db27c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, spandan2/Wgan-GP_cats 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.

gradient_penalty Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LynnHo/DCGAN-LSGAN-WGAN-WGAN-GP-Tensorflow/tf2gan/loss.py
code served (permissive licence) · get_code("db554be6d2613650")
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 SymbolicTensor. 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 tensorflow as tf
import numpy as np

# Define a simple discriminator model that takes input and outputs predictions
class SimpleDiscriminator(tf.keras.Model):
    def __init__(self):
        super(SimpleDiscriminator, self).__init__()
        self.dense = tf.keras.layers.Dense(1)
    
    def call(self, x):
        return self.dense(x)

# Create the discriminator function
discriminator = SimpleDiscriminator()

# Create small sample tensors (batch_size=2, feature_dim=4)
real_data = tf.constant(np.random.randn(2, 4).astype(np.float32))
fake_data = tf.constant(np.random.randn(2, 4).astype(np.float32))

# Test with different modes
ARGS = {
    'f': discriminator,
    'real': real_data,
    'fake': fake_data,
    'mode': 'wgan-gp'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
mask_dis Ran
ran on a synthesized input
bigmao8576/WGAN-GP-Tensorflow2/WGAN_GP_mask.py
pointer only (licence: NONE) · get_code("496ef1809697c415")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bigmao8576/WGAN-GP-Tensorflow2 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.

register Ran
ran; our contract draft was wrong, not the code
unicredit/ganzo/src/loss.py
code served (permissive licence) · get_code("28c0e133abb7a340")
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 function. 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 collections import defaultdict

class RegistryError(ValueError):
    pass

class Registry:
    _available = defaultdict(dict)
    _defaults = dict()
    _option_functions = []

    @staticmethod
    def add(namespace, name, cls):
        Registry._available[namespace][name] = cls

    @staticmethod
    def keys(namespace):
        return list(Registry._available[namespace].keys())

    @staticmethod
    def get(namespace, name):
        return Registry._available[namespace].get(name)

    @staticmethod
    def set_default(namespace, name):
        if namespace in Registry._defaults:
            raise RegistryError(f'namespace {namespace} already has a default: {Registry._defaults[namespace]}')
        Registry._defaults[namespace] = name

    @staticmethod
    def default(namespace):
        return Registry._defaults.get(namespace)

    @staticmethod
    def add_option_function(f):
        Registry._option_functions.append(f)

    @staticmethod
    def option_functions():
        return list(Registry._option_functions)

def register(namespace, name, default=False):
    def inner(cls):
        Registry.add(namespace, name, cls)
        if default:
            Registry.set_default(namespace, name)
        return cls
    return inner

# Create test class to be registered
class DummyModel:
    pass

# Clear registry for clean test
Registry._available = defaultdict(dict)
Registry._defaults = dict()
Registry._option_functions = []

# Test arguments
ARGS = {
    "namespace": "test_models",
    "name": "dummy",
    "default": 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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
sample_noise Ran
ran, honoured the contract we drafted
MaximeVandegar/Papers-in-100-Lines-of-Code/Improved_Training_of_Wasserstein_GANs/wgan.py
code served (permissive licence) · get_code("1d4e891b5ef55d07")
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, 128) 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)

ARGS = {
    "batch_size": 2,
    "device": torch.device("cpu"),
}
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, 128) — shape (2, 128) 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
Discriminator Not yet run
unverified (harvested, no recorded run)
YuguangTong/improved_wgan_training/gan_toy.py
code served (permissive licence) · get_code("9e3664dc1f8d79a4")
How it ran

no invocation recorded.

GP_Loss Not yet run
unverified (harvested, no recorded run)
shahbuland/basic-gans/GP-WGAN-pytorch.py
pointer only (licence: NONE) · get_code("38d85a91590ced10")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, shahbuland/basic-gans 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.

GlobalNormClip Not yet run
unverified (harvested, no recorded run)
tensorpack/tensorpack/tensorpack/tfutils/gradproc.py
code served (permissive licence) · get_code("50a07668fe9b3d3b")
How it ran

no invocation recorded.

GradientProcessor Not yet run
unverified (harvested, no recorded run)
tensorpack/tensorpack/tensorpack/tfutils/gradproc.py
code served (permissive licence) · get_code("bbe44bc91a190f0e")
How it ran

no invocation recorded.

Mode Not yet run
unverified (harvested, no recorded run)
ydataai/ydata-synthetic/src/data_synthetic/synthesizers/loss.py
code served (permissive licence) · get_code("f71df416fb250739")
How it ran

no invocation recorded.

ReLULayer Not yet run
unverified (harvested, no recorded run)
YuguangTong/improved_wgan_training/gan_toy.py
code served (permissive licence) · get_code("5ee58317d1dcf2be")
How it ran

no invocation recorded.

WGAN Not yet run
unverified (harvested, no recorded run)
changwoolee/WGAN-GP-tensorflow/model.py
code served (permissive licence) · get_code("65bfd6652f1fb02c")
How it ran

no invocation recorded.

WGAN_GP Not yet run
unverified (harvested, no recorded run)
zeleni9/pytorch-wgan/models/wgan_gradient_penalty.py
code served (permissive licence) · get_code("bb30b440df15c192")
How it ran

no invocation recorded.

WGAN_GP Not yet run
unverified (harvested, no recorded run)
mbarbetti/tf-gen-models/tf_gen_models/algorithms/gan/WGAN_GP.py
code served (permissive licence) · get_code("856effeb4071ae21")
How it ran

no invocation recorded.

WGAN_GP_MODEL Not yet run
unverified (harvested, no recorded run)
dabsdamoon/Anime-Colorization-v0.2/WGAN-GP/model.py
pointer only (licence: NONE) · get_code("1c858a9e29fdfd8d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dabsdamoon/Anime-Colorization-v0.2 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.

WassersteinGAN Not yet run
unverified (harvested, no recorded run)
dylanell/wasserstein-gan/model/wasserstein_gan.py
pointer only (licence: NONE) · get_code("4d3cbfe5a38c03da")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dylanell/wasserstein-gan 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.

WassersteinGANLossGPDiscriminator Not yet run
unverified (harvested, no recorded run)
ChristophReich1996/Dirac-GAN/dirac_gan/loss.py
code served (permissive licence) · get_code("02d4f9b368ee5f51")
How it ran

no invocation recorded.

_conv_layer Not yet run
unverified (harvested, no recorded run)
itsuki8914/wgan-gp-TensorFlow/model.py
pointer only (licence: NONE) · get_code("01ccd87d89d80f58")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, itsuki8914/wgan-gp-TensorFlow 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.

_conv_variable Not yet run
unverified (harvested, no recorded run)
itsuki8914/wgan-gp-TensorFlow/model.py
pointer only (licence: NONE) · get_code("d3cc657acec1530d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, itsuki8914/wgan-gp-TensorFlow 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.

_fc_variable Not yet run
unverified (harvested, no recorded run)
itsuki8914/wgan-gp-TensorFlow/model.py
pointer only (licence: NONE) · get_code("4e7d156f3933749a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, itsuki8914/wgan-gp-TensorFlow 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.

buildDiscriminator Not yet run
unverified (harvested, no recorded run)
itsuki8914/wgan-gp-TensorFlow/model.py
pointer only (licence: NONE) · get_code("4e63648612d1972d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, itsuki8914/wgan-gp-TensorFlow 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.

compute_gradient_penalty Not yet run
unverified (harvested, no recorded run)
eriklindernoren/PyTorch-GAN/implementations/wgan_gp/wgan_gp.py
code served (permissive licence) · get_code("90d0782f63f78a1d")
How it ran

no invocation recorded.

gradient_penalty Not yet run
unverified (harvested, no recorded run)
raylyh/misgan-reimplementation/src/conv_misgan.py
pointer only (licence: NONE) · get_code("ca4a31233df66289")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, raylyh/misgan-reimplementation 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.

gradient_penalty Not yet run
unverified (harvested, no recorded run)
marload/GANs-TensorFlow2/WGAN-GP/WGAN-GP.py
code served (permissive licence) · get_code("a931b7024fe9731c")
How it ran

no invocation recorded.

gradient_penalty Not yet run
unverified (harvested, no recorded run)
ydataai/ydata-synthetic/src/data_synthetic/synthesizers/loss.py
code served (permissive licence) · get_code("317df542c2389065")
How it ran

no invocation recorded.

tile_images Not yet run
unverified (harvested, no recorded run)
dylanell/wasserstein-gan/model/wasserstein_gan.py
pointer only (licence: NONE) · get_code("47b7024248fb9c22")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dylanell/wasserstein-gan 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.

train Not yet run
unverified (harvested, no recorded run)
MaximeVandegar/Papers-in-100-Lines-of-Code/Improved_Training_of_Wasserstein_GANs/wgan.py
code served (permissive licence) · get_code("0fdb0bd2677b553b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 49 samples lifted from this paper's linked repositories, 49 carry a function identity and 0 do not. Of the 49 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 48 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
GP_Loss
brick of this paper's assembly: entry
1 other paper
1 dated earlier
1701.07875 (2017-01)
Wasserstein GAN

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

More are linked than shown here.

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

Abstract

Generative Adversarial Networks (GANs) are powerful generative models, but suffer from training instability. The recently proposed Wasserstein GAN (WGAN) makes progress toward stable training of GANs, but sometimes can still generate only poor samples or fail to converge. We find that these problems are often due to the use of weight clipping in WGAN to enforce a Lipschitz constraint on the critic, which can lead to undesired behavior. We propose an alternative to clipping weights: penalize the norm of gradient of the critic with respect to its input. Our proposed method performs better than standard WGAN and enables stable training of a wide variety of GAN architectures with almost no hyperparameter tuning, including 101-layer ResNets and language models with continuous generators. We also achieve high quality generations on CIFAR-10 and LSUN bedrooms. † * Now at Google Brain † Code for our models is available at https://github.com/igul222/improved_wgan_training.

For agents

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

get_harvested_code_for_paper("1704.00028")
get_code_for_paper("1704.00028")
have("1704.00028")

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

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

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

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

Connect an agent — have() is free.