SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1512.04150 · 2015

Learning Deep Features for Discriminative Localization

arXiv · PDF · Open in the Atlas

Code that ran

4 of 17 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 1 has no contract verdict; 3 failures of our instrument; 13 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/1512.04150.json · badge: /api/ran/1512.04150.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
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
HRanWang/SA community (classifier label)
classifier basis not recorded on the link
1 ran · 5 no recorded run
djib2011/high-res-mapping community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
philipperemy/tensorflow-class-activation-mapping community (classifier label)
classifier basis not recorded on the link
0 ran · 4 no recorded run
Seb-Good/deep_ecg community (classifier label)
classifier basis not recorded on the link
0 ran · 3 no recorded run
MarcBS/keras extension (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
pairwise_distance Ran
ran on a synthesized input
HRanWang/SA/reid/evaluators.py
code served (permissive licence) · get_code("e6f090a0a1fb4c32")
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, 2) 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)

# Analyzing the function:
# - query_features: dict-like, accessed with keys from query tuples
# - gallery_features: dict-like, accessed with keys from gallery tuples
# - query: None or list of tuples (f, _, _) where f is a key
# - gallery: None or list of tuples (f, _, _) where f is a key

# Creating small feature tensors (batch=2, dim=4)
query_features = {
    'img_0': torch.randn(4),
    'img_1': torch.randn(4),
}

gallery_features = {
    'img_2': torch.randn(4),
    'img_3': torch.randn(4),
}

# Creating query and gallery as lists of tuples (filename, _, _)
query = [
    ('img_0', None, None),
    ('img_1', None, None),
]

gallery = [
    ('img_2', None, None),
    ('img_3', None, None),
]

ARGS = {
    'query_features': query_features,
    'gallery_features': gallery_features,
    'query': query,
    'gallery': gallery,
}
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, 2) — shape (2, 2) 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
preprocess_input Ran
ran; our contract draft was wrong, not the code
djib2011/high-res-mapping/densenet.py
code served (permissive licence) · get_code("df095bccc89495e4")
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 4, dtype family float, shape (2, 4, 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 numpy as np

# Create a small 4D input tensor (batch_size=2, height=4, width=4, channels=3)
# This is a batch of 2 images with height 4, width 4, and 3 color channels
x = np.random.rand(2, 4, 4, 3).astype(np.float32) * 255

# data_format can be None, 'channels_last', or 'channels_first'
# Using None lets Keras use the default
data_format = None

ARGS = {
    "x": x,
    "data_format": data_format,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (2, 4, 4, 3) — shape (2, 4, 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
swin_reshape_transform Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from frgfm/torch-cam
pointer only · get_code("cd9e431963bd28ca")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

vit_reshape_transform Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from frgfm/torch-cam
pointer only · get_code("3e3e7c2d436361ca")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

accuracy Not yet run
unverified (harvested, no recorded run)
HRanWang/SA/reid/evaluation_metrics/classification.py
code served (permissive licence) · get_code("772e4c0adffb5ced")
How it ran

no invocation recorded.

batch_norm_layer Not yet run
unverified (harvested, no recorded run)
Seb-Good/deep_ecg/deepecg/training/networks/layers.py
code served (permissive licence) · get_code("90f0009f4943eaba")
How it ran

no invocation recorded.

cmc Not yet run
unverified (harvested, no recorded run)
HRanWang/SA/reid/evaluation_metrics/ranking.py
code served (permissive licence) · get_code("45d780ae624e4a07")
How it ran

no invocation recorded.

compute_attention Not yet run
unverified (harvested, no recorded run)
MarcBS/keras/keras/layers/recurrent_advanced.py
pointer only (licence: NOASSERTION) · get_code("29da671ed0be79c5")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, MarcBS/keras (NOASSERTION). 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_layer Not yet run
unverified (harvested, no recorded run)
Seb-Good/deep_ecg/deepecg/training/networks/layers.py
code served (permissive licence) · get_code("3868070230627300")
How it ran

no invocation recorded.

evaluate_all Not yet run
unverified (harvested, no recorded run)
HRanWang/SA/reid/evaluators.py
code served (permissive licence) · get_code("86c7510a3d312224")
How it ran

no invocation recorded.

extract_features Not yet run
unverified (harvested, no recorded run)
HRanWang/SA/reid/evaluators.py
code served (permissive licence) · get_code("a3a0b6aa3ef1629d")
How it ran

no invocation recorded.

fc_layer Not yet run
unverified (harvested, no recorded run)
Seb-Good/deep_ecg/deepecg/training/networks/layers.py
code served (permissive licence) · get_code("8bea81cdefc702dc")
How it ran

no invocation recorded.

get_class_map Not yet run
unverified (harvested, no recorded run)
philipperemy/tensorflow-class-activation-mapping/class_activation_map.py
code served (permissive licence) · get_code("7324083eaa579a70")
How it ran

no invocation recorded.

load_image Not yet run
unverified (harvested, no recorded run)
philipperemy/tensorflow-class-activation-mapping/utils.py
code served (permissive licence) · get_code("3d17be084f03b272")
How it ran

no invocation recorded.

mean_ap Not yet run
unverified (harvested, no recorded run)
HRanWang/SA/reid/evaluation_metrics/ranking.py
code served (permissive licence) · get_code("7138b7088bf941e8")
How it ran

no invocation recorded.

new_conv_layer Not yet run
unverified (harvested, no recorded run)
philipperemy/tensorflow-class-activation-mapping/utils.py
code served (permissive licence) · get_code("8c76c366331fd7d8")
How it ran

no invocation recorded.

read_dataset Not yet run
unverified (harvested, no recorded run)
philipperemy/tensorflow-class-activation-mapping/utils.py
code served (permissive licence) · get_code("3f1ecae9b50aa92a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 6 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 6 later) and 11 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
swin_reshape_transform 5 other papers
5 later
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
1710.11063 (2017-10)
Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks
1908.01224 (2019-08)
Smooth Grad-CAM++: An Enhanced Inference Level Visualization Technique for Deep Convolutional Neural Network Models
and 2 more not named here
vit_reshape_transform 5 other papers
5 later
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
1710.11063 (2017-10)
Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks
1908.01224 (2019-08)
Smooth Grad-CAM++: An Enhanced Inference Level Visualization Technique for Deep Convolutional Neural Network Models
and 2 more not named here
evaluate_all 1 other paper
1 later
1904.00537 (2019-04)
Perceive Where to Focus: Learning Visibility-aware Part-level Features for Partial Person Re-identification
mean_ap 1 other paper
1 later
1904.02998 (2019-04)
Relation-Aware Global Attention for Person Re-identification
pairwise_distance 1 other paper
1 later
1904.00537 (2019-04)
Perceive Where to Focus: Learning Visibility-aware Part-level Features for Partial Person Re-identification
preprocess_input 1 other paper
1 later
1710.09829 (2017-10)
Dynamic Routing Between Capsules

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

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

In this work, we revisit the global average pooling layer proposed in [13], and shed light on how it explicitly enables the convolutional neural network to have remarkable localization ability despite being trained on image-level labels. While this technique was previously proposed as a means for regularizing training, we find that it actually builds a generic localizable deep representation that can be applied to a variety of tasks. Despite the apparent simplicity of global average pooling, we are able to achieve 37.1% top-5 error for object localization on ILSVRC 2014, which is remarkably close to the 34.2% top-5 error achieved by a fully supervised CNN approach. We demonstrate that our network is able to localize the discriminative image regions on a variety of tasks despite not being trained for them

For agents

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

get_harvested_code_for_paper("1512.04150")
get_code_for_paper("1512.04150")
have("1512.04150")

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

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

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

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

Connect an agent — have() is free.