SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1604.07379 · 2016

Context Encoders: Feature Learning by Inpainting

Deepak Pathak, Jeff Donahue, Trevor Darrell, Alexei Efros, Philipp Krähenbühl

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 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; 2 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1604.07379.json · badge: /api/ran/1604.07379.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
shekkizh/TensorflowProjects community (classifier label)
classifier basis not recorded on the link
2 ran · 3 no recorded run
basilevh/image-outpainting community
Papers with Code archive
1 ran · 0 no recorded run
eriklindernoren/PyTorch-GAN community
Papers with Code archive
1 ran · 0 no recorded run
chhankyao/3D_defect_detection community
Papers with Code archive
1 ran · 0 no recorded run
akshay-gupta123/Context-Encoder community
Papers with Code archive
1 ran · 0 no recorded run
YeongHyeon/Context-Encoder community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
CEGenerator Ran
ran on a synthesized input
basilevh/image-outpainting/outpainting.py
pointer only (licence: GPL-3.0) · get_code("dc84652848da9f96")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, basilevh/image-outpainting, 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.

Generator Ran
ran on a synthesized input · constructed an object; no result was computed
eriklindernoren/PyTorch-GAN/implementations/context_encoder/models.py
code served (permissive licence) · get_code("464c0d93345430d1")
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)

# The Generator.__init__ takes only one parameter: channels
# channels is an integer that defaults to 3
# It's used to determine input/output channels for the first/last conv layers

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 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
_netG Ran
ran on a synthesized input · constructed an object; no result was computed
chhankyao/3D_defect_detection/context_encoder/model.py
pointer only (licence: NONE) · get_code("b43de8f01dba9ebe")
How it ran

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

bias_variable Ran
ran; our contract draft was wrong, not the code
shekkizh/TensorflowProjects/MNIST/Uncertainty_modelling.py
pointer only (licence: MIT); the stored copy get_code serves, from jerichooconnell/tf_unet, is pointer only (licence: GPL-3.0) · get_code("5d78e1f7a1afb766")
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 jerichooconnell/tf_unet, and GPL-3.0, as GitHub detects it on that repository, 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.

conv2d_basic Ran
ran on a synthesized input
shekkizh/TensorflowProjects/MNIST/Uncertainty_modelling.py
code served (permissive licence) · get_code("eca225d53673a1ea")
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 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 tensorflow as tf
import numpy as np

# Create a small input tensor for x
# Shape: [batch_size, height, width, channels]
# Using batch=2, height=4, width=3, channels=2
x = tf.constant(np.random.randn(2, 4, 3, 2).astype(np.float32))

# Create a small weight tensor for W
# Shape: [filter_height, filter_width, in_channels, out_channels]
# Using filter_height=3, filter_width=3, in_channels=2, out_channels=4
W = tf.constant(np.random.randn(3, 3, 2, 4).astype(np.float32))

ARGS = {
    'x': x,
    'W': W,
}
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 4) — shape (2, 4, 3, 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
define_generator Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
akshay-gupta123/Context-Encoder/model.py
pointer only (licence: NONE) · get_code("312e507a19709c06")
How it ran

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

Context_Encoder Not yet run
unverified (harvested, no recorded run)
YeongHyeon/Context-Encoder/source/neuralnet.py
code served (permissive licence) · get_code("333728b5782d5963")
How it ran

no invocation recorded.

weight_variable Not yet run
unverified (harvested, no recorded run)
shekkizh/TensorflowProjects/MNIST/Uncertainty_modelling.py
code served (permissive licence) · get_code("cb07eb141f5648be")
How it ran

no invocation recorded.

weight_variable_xavier_initialized Not yet run
unverified (harvested, no recorded run)
shekkizh/TensorflowProjects/TensorflowUtils.py
code served (permissive licence) · get_code("4fca58134a4f0785")
How it ran

no invocation recorded.

xavier_init Not yet run
unverified (harvested, no recorded run)
shekkizh/TensorflowProjects/TensorflowUtils.py
code served (permissive licence) · get_code("5645c84de7678d1e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 2 the same month, 4 later) and 6 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
bias_variable 5 other papers
1 dated earlier, 1 the same month, 3 later
1505.04597 (2015-05)
U-Net: Convolutional Networks for Biomedical Image Segmentation
1604.07316 (2016-04)
End to End Learning for Self-Driving Cars
1804.05271 (2018-04)
Adaptive Federated Learning in Resource Constrained Edge Computing Systems
and 2 more not named here
xavier_init 4 other papers
4 later
1701.07875 (2017-01)
Wasserstein GAN
1703.01488 (2017-03)
Autoencoding Variational Inference For Topic Models
1909.06296 (2019-09)
Bayesian parameter estimation using conditional variational autoencoders for gravitational-wave astronomy
and 1 more not named here
weight_variable 3 other papers
1 the same month, 2 later
1604.07316 (2016-04)
End to End Learning for Self-Driving Cars
1804.05271 (2018-04)
Adaptive Federated Learning in Resource Constrained Edge Computing Systems
1912.09091 (2019-12)
Overcoming Long-term Catastrophic Forgetting through Adversarial Neural Pruning and Synaptic Consolidation
weight_variable_xavier_initialized 1 other paper
1 later
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-23.

Repositories linked to this paper

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

Abstract

We present an unsupervised visual feature learning algorithm driven by context-based pixel prediction. By analogy with auto-encoders, we propose Context Encoders -a convolutional neural network trained to generate the contents of an arbitrary image region conditioned on its surroundings. In order to succeed at this task, context encoders need to both understand the content of the entire image, as well as produce a plausible hypothesis for the missing part(s). When training context encoders, we have experimented with both a standard pixel-wise reconstruction loss, as well as a reconstruction plus an adversarial loss. The latter produces much sharper results because it can better handle multiple modes in the output. We found that a context encoder learns a representation that captures not just appearance but also the semantics of visual structures. We quantitatively demonstrate the effectiveness of our learned features for CNN pre-training on classification, detection, and segmentation tasks. Furthermore, context encoders can be used for semantic inpainting tasks, either stand-alone or as initialization for non-parametric methods.

For agents

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

get_harvested_code_for_paper("1604.07379")
get_code_for_paper("1604.07379")
have("1604.07379")

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

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

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

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

Connect an agent — have() is free.