SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.08198 · 2020

AutoGAN-Distiller: Searching to Compress Generative Adversarial Networks

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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 4 have no contract verdict; 1 failure 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/2006.08198.json · badge: /api/ran/2006.08198.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
vita-group/gan-slimming community (classifier label)
classifier basis not recorded on the link
5 ran · 3 no recorded run
FunctionStatusWhere it lives
gram_matrix Ran
ran; our contract draft was wrong, not the code
vita-group/gan-slimming/utils/perceptual.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.

load_ckpt Ran
ran on a synthesized input
vita-group/gan-slimming/utils/utils.py
code served (permissive licence) · get_code("059345875fabd4d1")
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
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import StepLR
import tempfile
import os

torch.manual_seed(0)

# Define minimal nn.Module for generator
class MinimalNetG(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.linear(x)

# Define minimal nn.Module for discriminator
class MinimalNetD(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(8, 1)
    
    def forward(self, x):
        return self.linear(x)

# Create instances
netG = MinimalNetG()
netD = MinimalNetD()

# Create optimizers
optimizer_G = optim.Adam(netG.parameters(), lr=0.0002)
optimizer_D = optim.Adam(netD.parameters(), lr=0.0002)
optimizer_gamma = optim.Adam(netG.parameters(), lr=0.0001)

# Create learning rate schedulers
lr_scheduler_G = StepLR(optimizer_G, step_size=10)
lr_scheduler_D = StepLR(optimizer_D, step_size=10)
lr_scheduler_gamma = StepLR(optimizer_gamma, step_size=10)

# Create a temporary checkpoint file
with tempfile.NamedTemporaryFile(delete=False, suffix='.pt') as tmp:
    checkpoint_path = tmp.name
    
    # Create checkpoint dict with all required keys
    checkpoint = {
        'epoch': 5,
        'loss_G_lst': [0.5, 0.4, 0.3, 0.2, 0.1],
        'loss_G_perceptual_lst': [0.6, 0.5, 0.4, 0.3, 0.2],
        'loss_G_GAN_lst': [0.4, 0.3, 0.2, 0.1, 0.05],
        'loss_D_lst': [0.7, 0.6, 0.5, 0.4, 0.3],
        'channel_number_lst': [1, 2, 3, 4, 5],
        'netG': netG.state_dict(),
        'netD': netD.state_dict(),
        'optimizer_G': optimizer_G.state_dict(),
        'optimizer_D': optimizer_D.state_dict(),
        'optimizer_gamma': optimizer_gamma.state_dict(),
        'lr_scheduler_G': lr_scheduler_G.state_dict(),
        'lr_scheduler_D': lr_scheduler_D.state_dict(),
        'lr_scheduler_gamma': lr_scheduler_gamma.state_dict(),
    }
    
    torch.save(checkpoint, checkpoint_path)

ARGS = {
    'netG': netG,
    'netD': netD,
    'optimizer_G': optimizer_G,
    'optimizer_D': optimizer_D,
    'optimizer_gamma': optimizer_gamma,
    'lr_scheduler_G': lr_scheduler_G,
    'lr_scheduler_D': lr_scheduler_D,
    'lr_scheduler_gamma': lr_scheduler_gamma,
    'path': checkpoint_path,
}
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
load_ckpt_finetune Ran
ran on a synthesized input
vita-group/gan-slimming/utils/utils.py
code served (permissive licence) · get_code("fae20b9ba8a551e6")
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
import torch.nn as nn
import torch.optim as optim
import tempfile
import os

torch.manual_seed(0)

# Create minimal generator and discriminator models
class MinimalGenerator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class MinimalDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(3, 1)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate models
netG = MinimalGenerator()
netD = MinimalDiscriminator()

# Instantiate optimizers
optimizer_G = optim.Adam(netG.parameters(), lr=0.0002)
optimizer_D = optim.Adam(netD.parameters(), lr=0.0002)

# Instantiate learning rate schedulers
lr_scheduler_G = optim.lr_scheduler.StepLR(optimizer_G, step_size=10, gamma=0.1)
lr_scheduler_D = optim.lr_scheduler.StepLR(optimizer_D, step_size=10, gamma=0.1)

# Create a temporary checkpoint file
temp_dir = tempfile.gettempdir()
ckpt_path = os.path.join(temp_dir, 'test_ckpt.pth')

# Build checkpoint dictionary
ckpt = {
    'epoch': 5,
    'loss_G_lst': [0.5, 0.4, 0.3],
    'loss_G_perceptual_lst': [0.2, 0.15, 0.1],
    'loss_G_GAN_lst': [0.3, 0.25, 0.2],
    'loss_D_lst': [0.6, 0.5, 0.4],
    'best_FID': 25.5,
    'netG': netG.state_dict(),
    'netD': netD.state_dict(),
    'optimizer_G': optimizer_G.state_dict(),
    'optimizer_D': optimizer_D.state_dict(),
    'lr_scheduler_G': lr_scheduler_G.state_dict(),
    'lr_scheduler_D': lr_scheduler_D.state_dict(),
}

# Save checkpoint
torch.save(ckpt, ckpt_path)

ARGS = {
    'netG': netG,
    'netD': netD,
    'optimizer_G': optimizer_G,
    'optimizer_D': optimizer_D,
    'lr_scheduler_G': lr_scheduler_G,
    'lr_scheduler_D': lr_scheduler_D,
    'path': ckpt_path,
}
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
perceptual_loss Ran
ran on a synthesized input
vita-group/gan-slimming/utils/perceptual.py
code served (permissive licence) · get_code("6e7de6b67b97d840")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple stand-in class for VGG features
class VGGFeatures:
    def __init__(self):
        # Create small tensors for each relu layer
        # batch=2, channels=4, height=3, width=5 (distinct sizes)
        self.relu1_2 = torch.randn(2, 4, 3, 5)
        self.relu2_2 = torch.randn(2, 8, 3, 5)
        self.relu3_3 = torch.randn(2, 16, 3, 5)
    
    def __iter__(self):
        # Iterate over all relu feature maps for style loss calculation
        yield self.relu1_2
        yield self.relu2_2
        yield self.relu3_3

# Instantiate two VGG feature objects
vgg_features1 = VGGFeatures()
vgg_features2 = VGGFeatures()

ARGS = {
    'vgg_features1': vgg_features1,
    'vgg_features2': vgg_features2,
    'beta': 100000.0,
    'layer': 'relu1_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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tensor2image Ran
ran on a synthesized input
vita-group/gan-slimming/utils/utils.py
code served (permissive licence) · get_code("0ee3f9ee92d8a8c6")
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 (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

torch.manual_seed(0)

# Create a tensor with shape (batch=1, channels=1, height=4, width=3)
# The function expects tensor[0] to be indexable and have .cpu(), .float(), .numpy() methods
# It normalizes from [-1, 1] range to [0, 255]
tensor = torch.randn(1, 1, 4, 3)

ARGS = {
    "tensor": 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 (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
calculate_activation_statistics Not yet run
unverified (harvested, no recorded run)
vita-group/gan-slimming/utils/fid_score.py
code served (permissive licence) · get_code("6855707db474b0fe")
How it ran

no invocation recorded.

calculate_frechet_distance Not yet run
unverified (harvested, no recorded run)
vita-group/gan-slimming/utils/fid_score.py
code served (permissive licence) · get_code("0def50a351111624")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

get_activations Not yet run
unverified (harvested, no recorded run)
vita-group/gan-slimming/utils/fid_score.py
code served (permissive licence) · get_code("a15c72fa852b3ce1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 8 later) and 0 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
calculate_frechet_distance 74 other papers
13 dated earlier, 3 the same month, 58 later
1610.09585 (2016-10)
Conditional Image Synthesis With Auxiliary Classifier GANs
1706.08500 (2017-06)
GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium
1807.11458 (2018-07)
To learn image super-resolution, use a GAN to learn how to do image degradation first
and 71 more not named here
gram_matrix 9 other papers
5 dated earlier, 4 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
calculate_activation_statistics 6 other papers
2 dated earlier, 1 the same month, 3 later
1912.07414 (2019-12)
Learning Canonical Representations for Scene Graph to Image Generation
2003.02567 (2020-03)
GANwriting: Content-Conditioned Generation of Styled Handwritten Word Images
2006.10738 (2020-06)
Differentiable Augmentation for Data-Efficient GAN Training
and 3 more not named here
tensor2image 2 other papers
2 later
2008.11062 (2020-08)
GAN Slimming: All-in-One GAN Compression by A Unified Optimization Framework
2203.12691 (2022-03)
Learning to generate line drawings that convey geometry and semantics
get_activations 1 other paper
1 later
2008.11062 (2020-08)
GAN Slimming: All-in-One GAN Compression by A Unified Optimization Framework
load_ckpt 1 other paper
1 later
2008.11062 (2020-08)
GAN Slimming: All-in-One GAN Compression by A Unified Optimization Framework
load_ckpt_finetune 1 other paper
1 later
2008.11062 (2020-08)
GAN Slimming: All-in-One GAN Compression by A Unified Optimization Framework
perceptual_loss 1 other paper
1 later
2008.11062 (2020-08)
GAN Slimming: All-in-One GAN Compression by A Unified Optimization Framework

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

The compression of Generative Adversarial Networks (GANs) has lately drawn attention, due to the increasing demand for deploying GANs into mobile devices for numerous applications such as image translation, enhancement and editing. However, compared to the substantial efforts to compressing other deep models, the research on compressing GANs (usually the generators) remains at its infancy stage. Existing GAN compression algorithms are limited to handling specific GAN architectures and losses. Inspired by the recent success of AutoML in deep compression, we introduce AutoML to GAN compression and develop an AutoGAN-Distiller (AGD) framework. Starting with a specifically designed efficient search space, AGD performs an end-to-end discovery for new efficient generators, given the target computational resource constraints. The search is guided by the original GAN model via knowledge distillation, therefore fulfilling the compression. AGD is fully automatic, standalone (i.e., needing no trained discriminators), and generically applicable to various GAN models. We evaluate AGD in two representative GAN tasks: image translation and super resolution. Without bells and whistles, AGD yields remarkably lightweight yet more competitive compressed models, that largely outperform existing alternatives. Our codes and pretrained models are available at https://github.com/TAMU-VITA/AGD.

For agents

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

get_harvested_code_for_paper("2006.08198")
get_code_for_paper("2006.08198")
have("2006.08198")

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

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

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

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

Connect an agent — have() is free.