Skip to main content

PyTorch implementation of ThriftyNet by Guillaume Coiffier, Ghouthi Boukli Hacene, and Vincent Gripon.

Project description

Thrifty Networks

Installation

pip install thriftynet

Usage

You can use the encoder only:

from thriftynet import ThriftyEncoder

encoder = ThriftyEncoder(
    filters=128,
    iterations=20,
    kernel_size=3,
    normalization="layer"
)
images = torch.randn(1, 3, 224, 224)
features = encoder(images)
print(features.size(1)) # prints 128

Alternatively initialize a network with a classification head:

from thriftynet import ThriftyNetwork

encoder = ThriftyNetwork(
    100,
    filters=128,
    iterations=20,
    kernel_size=3,
    normalization="layer"
)
images = torch.randn(1, 3, 224, 224)
features = encoder(images)
print(features.size(1)) # prints 100

Abstract

Typical deep convolutional architectures present an increasing number of feature maps as we go deeper in the network, whereas spatial resolution of inputs is decreased through downsampling operations. This means that most of the parameters lay in the final layers, while a large portion of the computations are performed by a small fraction of the total parameters in the first layers.

In an effort to use every parameter of a network at its maximum, we propose a new convolutional neural network architecture, called ThriftyNet. In ThriftyNet, only one convolutional layer is defined and used recursively, leading to a maximal parameter factorization.

In complement, normalization, non-linearities, downsamplings and shortcut ensure sufficient expressivity of the model. ThriftyNet achieves competitive performance on a tiny parameters budget, exceeding 91% accuracy on CIFAR-10 with less than 40K parameters in total, and 74.3% on CIFAR-100 with less than 600K parameters.

Results

Citation

@software{thriftynets2026implementation,
    author = {Taha Shieenavaz},
    title = {ThriftyNets: Convolutional Neural Networks with Tiny Parameter Budget (Unofficial Implementation)},
    year = {2026},
    url = {https://github.com/tahashieenavaz/thriftynet},
    note = {Unofficial implementation of the paper arXiv:2007.10106 by Coiffier et al.}
}
@misc{2007.10106,
    Author = {Guillaume Coiffier and Ghouthi Boukli Hacene and Vincent Gripon},
    Title = {ThriftyNets : Convolutional Neural Networks with Tiny Parameter Budget},
    Year = {2020},
    Eprint = {arXiv:2007.10106},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thriftynet-1.0.0.tar.gz (537.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thriftynet-1.0.0-py3-none-any.whl (534.3 kB view details)

Uploaded Python 3

File details

Details for the file thriftynet-1.0.0.tar.gz.

File metadata

  • Download URL: thriftynet-1.0.0.tar.gz
  • Upload date:
  • Size: 537.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for thriftynet-1.0.0.tar.gz
Algorithm Hash digest
SHA256 198fa94b7a982c0438aafcfc4448bfd526d1e3efafd1b37da778c996a7f71919
MD5 9a2c485cce4e23c6217d78fa38171ade
BLAKE2b-256 ad851d1fa64b32d028b4d84b829ec29368ca58bf3982a3ddf92ce79cc51cc355

See more details on using hashes here.

File details

Details for the file thriftynet-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: thriftynet-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 534.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for thriftynet-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e593b5438e065e7eef2ddb23cbb9bfe592bbb22c5a9aefcdff3b1d21b32ad08
MD5 26eeb6802fa79b6bf591474ee1b1ad3e
BLAKE2b-256 bfc189304ba0be9a1671388070a57e40edb04062c243b9bf9569f4462db02117

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page