Skip to main content

Stochastic Depth with PyTorch Hooks Travis CI build status PyPI version

A simple hook based implementation of Deep Networks with Stochastic Depth for torchvision resnets.

Example

import torch
import torchvision.models as models
resnet = models.resnet152(pretrained=False)
resnet.train()

from stochdepth import uniform
hooks = uniform(resnet, p=0.2)

x = torch.zeros((8, 3, 224, 224), dtype=torch.float32)
y = resnet(x)

# remove hooks
for h in hooks:
    h.remove()

from stochdepth import resnet_linear
hooks = resnet_linear(resnet)

y = resnet(x)
# remove hooks
for h in hooks:
    h.remove()

Metadata

Release files for stochdepth 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stochdepth 0.5.0
File Size Uploaded Provenance Actions
stochdepth-0.5.0.tar.gz 3.0 kB Without provenance Details for stochdepth-0.5.0.tar.gz

Release files / stochdepth-0.5.0.tar.gz

Download URL stochdepth-0.5.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bf612c9f84e0825f1db75e0c2fdfe40c94f2e2879002007e6d03b95b2fe5ff35
BLAKE2b-256 checksum
How to use checksums
3268227a3355c88fbde99ed25dd8f0d1bfef071fc30b2b46e9127014d5ebce51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.7

Security for stochdepth 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page