SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1603.09382 · 2016

Deep Networks with Stochastic Depth

Kilian Weinberger, Yu Sun, Gao Huang, Zhuang Liu, Daniel Sedra

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 6 have no contract verdict; 1 failure of our instrument; 1 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/1603.09382.json · badge: /api/ran/1603.09382.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
pytorch/vision community
Papers with Code archive
1 ran · 1 no recorded run
andreasveit/densenet-pytorch community
Papers with Code archive
1 ran · 0 no recorded run
jiweeo/pytorch-stochastic-depth community
Papers with Code archive
1 ran · 0 no recorded run
felixgwu/img_classification_pk_pytorch community
Papers with Code archive
1 ran · 0 no recorded run
nachiket273/pytorch_resnet_rs community
Papers with Code archive
1 ran · 0 no recorded run
DarshanDeshpande/jax-models community
Papers with Code archive
1 ran · 0 no recorded run
shamangary/Pytorch-Stochastic-Depth-Resnet community
Papers with Code archive
1 ran · 0 no recorded run
zpc-666/Paddle-Stochastic-Depth-ResNet110 community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
BasicBlock Ran
ran on a synthesized input · constructed an object; no result was computed
andreasveit/densenet-pytorch/densenet.py
code served (permissive licence) · get_code("0a1bd35d26d9935a")
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, BasicBlock: 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)

# BasicBlock expects:
# - in_planes: int (number of input channels)
# - out_planes: int (number of output channels)
# - dropRate: float (dropout rate, default 0.0)

ARGS = {
    "in_planes": 3,
    "out_planes": 16,
    "dropRate": 0.5,
}
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 BasicBlock — 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 BasicBlock 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
BasicBlock Ran
ran on a synthesized input
jiweeo/pytorch-stochastic-depth/models/base.py
code served (permissive licence) · get_code("0c07f75568d64e8b")
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 4, dtype family float, shape (2, 4, 8, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.nn.functional as F

def conv3x3(in_planes, out_planes, stride=1):
    """3x3 convolution with padding"""
    return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False)

class BasicBlock(nn.Module):
    expansion = 1

    def __init__(self, inplanes, planes, stride=1):
        super(BasicBlock, self).__init__()
        self.conv1 = conv3x3(inplanes, planes, stride)
        self.bn1 = nn.BatchNorm2d(planes, track_running_stats=False)
        self.relu = nn.ReLU(inplace=True)
        self.conv2 = conv3x3(planes, planes)
        self.bn2 = nn.BatchNorm2d(planes, track_running_stats=False)

    def forward(self, x):
        out = self.conv1(x)
        out = self.bn1(out)
        out = F.relu(out)
        out = self.conv2(out)
        out = self.bn2(out)
        return out


INIT_ARGS = {
    'inplanes': 3,
    'planes': 4,
    'stride': 1,
}

ARGS = {
    'x': torch.randn(2, 3, 8, 8),
}

if __name__ == '__main__':
    block = BasicBlock(**INIT_ARGS)
    output = block(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
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 4, dtype family float, shape (2, 4, 8, 8) — shape (2, 4, 8, 8) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
BasicBlockWithDeathRate Ran
ran on a synthesized input · constructed an object; no result was computed
felixgwu/img_classification_pk_pytorch/models/resnet.py
pointer only (licence: NONE) · get_code("dc11082963595174")
How it ran

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

DropPath Ran
ran on a synthesized input · constructed an object; no result was computed
nachiket273/pytorch_resnet_rs/model/base.py
code served (permissive licence) · get_code("bd6c794dd7be5c10")
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, DropPath: 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)

# DropPath.__init__ takes drop_prob parameter
# DropPath.forward takes x (a tensor) parameter
# The forward method uses:
# - x.shape[0] for batch dimension
# - x.ndim for number of dimensions
# - x.dtype and x.device for tensor properties
# - torch.rand() to generate random tensor
# - x.div() and multiplication operations

# Create a small input tensor: batch_size=2, with some feature dimensions
# Using distinct sizes: batch=2, seq_len=3, features=4
x = torch.randn(2, 3, 4)

# drop_prob parameter: use a value between 0 and 1 for stochastic depth
drop_prob = 0.5

ARGS = {
    "drop_prob": drop_prob,
}
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 DropPath — 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 DropPath 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
DropPath Ran
ran on a synthesized input · constructed an object; no result was computed
DarshanDeshpande/jax-models/jax_models/layers/drop.py
code served (permissive licence) · get_code("7e0f6db857f04fb0")
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, DropPath: 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 jax
import jax.numpy as jnp
import jax.random as random
import flax.linen as nn
from typing import Optional

# Create a small input tensor for testing
# Shape: (batch_size=2, height=4, width=3, channels=2)
input_tensor = jnp.ones((2, 4, 3, 2))

ARGS = {
    'dropout_prob': 0.1,
    'deterministic': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DropPath — 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 DropPath 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
StoDepth_BasicBlock Ran
ran on a synthesized input · constructed an object; no result was computed
shamangary/Pytorch-Stochastic-Depth-Resnet/TYY_stodepth_lineardecay.py
pointer only (licence: NONE) · get_code("53cd9fb110b96e3c")
How it ran

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

stochastic_depth Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pytorch/vision/torchvision/ops/stochastic_depth.py
code served (permissive licence) · get_code("23e54ee64c53fb22")
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 4, dtype family float, shape (2, 4, 3, 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
from torch import nn, Tensor

torch.manual_seed(0)

# Create a small input tensor with batch size 2 and arbitrary dimensions
input_tensor = torch.randn(2, 4, 3, 3)

# Define parameters for stochastic_depth
p = 0.5  # probability of dropping
mode = "batch"  # can be "batch" or "row"
training = True  # whether to apply stochastic depth

ARGS = {
    "input": input_tensor,
    "p": p,
    "mode": mode,
    "training": training,
}
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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
str2bool Ran
ran, violated the contract we drafted
zpc-666/Paddle-Stochastic-Depth-ResNet110/config/config.py
code served (permissive licence) · get_code("7c508037b40522af")
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 bool, ndim 0, dtype family float, shape () 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 argparse

def str2bool(v):
    if isinstance(v, bool):
        return v
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

# Test cases for str2bool
ARGS = {
    'v': 'true'  # string input that should convert to boolean
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 bool, ndim 0, dtype family float, shape () — shape () 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
_log_api_usage_once Not yet run
unverified (harvested, no recorded run)
pytorch/vision/torchvision/ops/stochastic_depth.py
code served (permissive licence) · get_code("ce9d2f65bde2578c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 4 later) and 4 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
str2bool 175 other papers
1 dated earlier, 174 later · 2 only as an assembly brick
1406.6247 (2014-06)
Recurrent Models of Visual Attention
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
1711.06396 (2017-11)
VoxelNet: End-to-End Learning for Point Cloud Based 3D Object Detection
and 172 more not named here
_log_api_usage_once
brick of this paper's assembly: helper
8 other papers
1 dated earlier, 7 later · 1 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
and 5 more not named here
DropPath
brick of this paper's assembly: entry
5 other papers
5 later · 1 only as an assembly brick
2102.12122 (2021-02)
Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2105.15203 (2021-05)
SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
and 2 more not named here
stochastic_depth
brick of this paper's assembly: entry
3 other papers
3 later
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2201.03545 (2022-01)
A ConvNet for the 2020s
BasicBlockWithDeathRate
brick of this paper's assembly: entry
1 other paper
1 dated earlier · 1 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition

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

Very deep convolutional networks with hundreds of layers have led to significant reductions in error on competitive benchmarks. Although the unmatched expressiveness of the many layers can be highly desirable at test time, training very deep networks comes with its own set of challenges. The gradients can vanish, the forward flow often diminishes, and the training time can be painfully slow. To address these problems, we propose stochastic depth, a training procedure that enables the seemingly contradictory setup to train short networks and use deep networks at test time. We start with very deep networks but during training, for each mini-batch, randomly drop a subset of layers and bypass them with the identity function. This simple approach complements the recent success of residual networks. It reduces training time substantially and improves the test error significantly on almost all data sets that we used for evaluation. With stochastic depth we can increase the depth of residual networks even beyond 1200 layers and still yield meaningful improvements in test error (4.91% on CIFAR-10).

For agents

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

get_harvested_code_for_paper("1603.09382")
get_code_for_paper("1603.09382")
have("1603.09382")

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

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

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

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

Connect an agent — have() is free.