← Open Source
andravin

wincnn

Winograd minimal convolution algorithm generator for convolutional neural networks.

InfrastructureKernelsPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
630
Stars
148
Forks
+1
This week
2
Contributors
Created 2016-07-04 · Updated 2026-10-13 · #15811 today
Top developers
andravincbalint13

andravin/wincnn is ranked 15,811 with 630 stars.

Same-category comparison

andravin/wincnn is ranked 15,811 among these 8 peers; Fast-Editor/Lynkr is ranked 15,824.

Same-category comparison
NameRankMetrics
iidamie/deepseek2api15,756
Language:
Python
Stars:
635
Forks:
188
shaqian/flutter_tflite15,762
Language:
Objective-C++
Stars:
635
Forks:
433
Description:
Flutter plugin for TensorFlow Lite.
axodox/axodox-machinelearning15,767
Language:
C++
Stars:
634
Forks:
41
Description:
This repository contains a pure C++ ONNX implementation of multiple offline AI models, such as StableDiffusion (1.5 and XL), ControlNet, Midas, HED and OpenPose.
klawsh/klaw.sh15,780
Language:
Go
Stars:
633
Forks:
41
Description:
kubectl for AI Agents.
Fast-Editor/Lynkr15,824
Language:
JavaScript
Stars:
629
Forks:
74
Description:
Streamline your workflow with Lynkr, a CLI tool that acts as an HTTP proxy for efficient code interactions using Claude Code CLI.
danielholanda/LeFlow15,829
Language:
Verilog
Stars:
629
Forks:
101
Description:
Enabling Flexible FPGA High-Level Synthesis of Tensorflow Deep Neural Networks.
diemus/azure-openai-proxy15,830
Language:
Go
Stars:
629
Forks:
76
Description:
A proxy for Azure OpenAI API that can convert an OpenAI request into an Azure OpenAI request.
7as0nch/mimo2codex15,838
Language:
TypeScript
Stars:
628
Forks:
64
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryInfrastructure
SubcategoryKernels
Stars630
Forks148
Contributors2
Created date2016-07-04
Updated date2026-10-13
Stars in 1 day0
Stars in 7 days1
Rank15,811
Previous rank15,613
Rank change-198
7-day stars rank11,104
Previous 7-day stars rank11,171
7-day stars rank change67
Total stars rank16,155
Previous total stars rank16,135
Total stars rank change-20
CountryUSA
README summary

wincnn A simple python module for computing minimal Winograd convolution algorithms for use with convolutional neural networks as proposed in [1]. 9 Example: F(2,3) For F(m,r) you must select m+r-2 polynomial interpolation points. In this example we compute transforms for F(2,3) or F(2x2,3x3) using polynomial interpolation points (0,1,-1). The last matrix is the 1D convolution F(2,3) computed using the transforms AT, G, and BT, on 4

element signal d[0. 2], and serves to verify the correctness of the transforms. This is a symbolic computation, so the result should be exact. Example: F(4,3) The following example computes transforms for F(4,3). Linear Convolution If instead of an FIR filter you want the algorithm for linear convolution, all you have to do is exchange and transpose the data and inverse transform matrices. This is referred to as the Transfomation Principle. Example: F(6,3

) This example computes transform for F(6,3). We will use fraction interpolation points 1/2 and -1/2, so we use sympy. Rational in order to keep the symbolic computation exact (using floating point values would make the derivation of the transforms subject to rounding error). Citing wincnn If you use wincnn in your research, please cite the software: Reference [1] "Fast Algorithms for Convolutional Neural Networks" Lavin and Gray, CVPR 2016.

Frequently asked questions

How many stars and forks are recorded?

andravin/wincnn has 630 stars and 148 forks.

What is the repository rank?

andravin/wincnn is ranked 15,811.

What language and category are recorded?

andravin/wincnn has 630 stars, uses Python and belongs to Infrastructure.

Which repository is closest in rank?

andravin/wincnn is compared with Fast-Editor/Lynkr, ranked 15,824 with 629 stars.

README

wincnn

A simple python module for computing minimal Winograd convolution algorithms for use with convolutional neural networks as proposed in [1].

Installation

pip install wincnn

Requirements

  • Python >= 3.8
  • SymPy >= 1.9

Example: F(2,3)

For F(m,r) you must select m+r-2 polynomial interpolation points.

In this example we compute transforms for F(2,3) or F(2x2,3x3) using polynomial interpolation points (0,1,-1).

$ python3
>>> import wincnn
>>> wincnn.showCookToomFilter((0,1,-1), 2, 3)
AT = 
⎡1  1  1   0⎤
⎢           ⎥
⎣0  1  -1  1⎦

G = 
⎡ 1    0     0 ⎤
⎢              ⎥
⎢1/2  1/2   1/2⎥
⎢              ⎥
⎢1/2  -1/2  1/2⎥
⎢              ⎥
⎣ 0    0     1 ⎦

BT = 
⎡1  0   -1  0⎤
⎢            ⎥
⎢0  1   1   0⎥
⎢            ⎥
⎢0  -1  1   0⎥
⎢            ⎥
⎣0  -1  0   1⎦

AT*((G*g)(BT*d)) =
⎡d[0]⋅g[0] + d[1]⋅g[1] + d[2]⋅g[2]⎤
⎢                                 ⎥
⎣d[1]⋅g[0] + d[2]⋅g[1] + d[3]⋅g[2]⎦

The last matrix is the 1D convolution F(2,3) computed using the transforms AT, G, and BT, on 4 element signal d[0..3] and 3 element filter g[0..2], and serves to verify the correctness of the transforms. This is a symbolic computation, so the result should be exact.

Example: F(4,3)

The following example computes transforms for F(4,3).

>>> wincnn.showCookToomFilter((0,1,-1,2,-2), 4, 3)
AT = 
⎡1  1  1   1  1   0⎤
⎢                  ⎥
⎢0  1  -1  2  -2  0⎥
⎢                  ⎥
⎢0  1  1   4  4   0⎥
⎢                  ⎥
⎣0  1  -1  8  -8  1⎦

G = 
⎡1/4     0     0  ⎤
⎢                 ⎥
⎢-1/6  -1/6   -1/6⎥
⎢                 ⎥
⎢-1/6   1/6   -1/6⎥
⎢                 ⎥
⎢1/24  1/12   1/6 ⎥
⎢                 ⎥
⎢1/24  -1/12  1/6 ⎥
⎢                 ⎥
⎣ 0      0     1  ⎦

BT = 
⎡4  0   -5  0   1  0⎤
⎢                   ⎥
⎢0  -4  -4  1   1  0⎥
⎢                   ⎥
⎢0  4   -4  -1  1  0⎥
⎢                   ⎥
⎢0  -2  -1  2   1  0⎥
⎢                   ⎥
⎢0  2   -1  -2  1  0⎥
⎢                   ⎥
⎣0  4   0   -5  0  1⎦

AT*((G*g)(BT*d)) =
⎡d[0]⋅g[0] + d[1]⋅g[1] + d[2]⋅g[2]⎤
⎢                                 ⎥
⎢d[1]⋅g[0] + d[2]⋅g[1] + d[3]⋅g[2]⎥
⎢                                 ⎥
⎢d[2]⋅g[0] + d[3]⋅g[1] + d[4]⋅g[2]⎥
⎢                                 ⎥
⎣d[3]⋅g[0] + d[4]⋅g[1] + d[5]⋅g[2]⎦

Linear Convolution

If instead of an FIR filter you want the algorithm for linear convolution, all you have to do is exchange and transpose the data and inverse transform matrices. This is referred to as the Transfomation Principle.

>>> wincnn.showCookToomConvolution((0,1,-1),2,3)
A = 
⎡1  0 ⎤
⎢     ⎥
⎢1  1 ⎥
⎢     ⎥
⎢1  -1⎥
⎢     ⎥
⎣0  1 ⎦

G = 
⎡ 1    0     0 ⎤
⎢              ⎥
⎢1/2  1/2   1/2⎥
⎢              ⎥
⎢1/2  -1/2  1/2⎥
⎢              ⎥
⎣ 0    0     1 ⎦

B = 
⎡1   0  0   0 ⎤
⎢             ⎥
⎢0   1  -1  -1⎥
⎢             ⎥
⎢-1  1  1   0 ⎥
⎢             ⎥
⎣0   0  0   1 ⎦

Linear Convolution: B*((G*g)(A*d)) =
⎡      d[0]⋅g[0]      ⎤
⎢                     ⎥
⎢d[0]⋅g[1] + d[1]⋅g[0]⎥
⎢                     ⎥
⎢d[0]⋅g[2] + d[1]⋅g[1]⎥
⎢                     ⎥
⎣      d[1]⋅g[2]      ⎦

Example: F(6,3)

This example computes transform for F(6,3). We will use fraction interpolation points 1/2 and -1/2, so we use sympy.Rational in order to keep the symbolic computation exact (using floating point values would make the derivation of the transforms subject to rounding error).

>>> from sympy import Rational
>>> wincnn.showCookToomFilter((0,1,-1,2,-2,Rational(1,2),-Rational(1,2)), 6, 3)
AT = 
⎡1  1  1   1    1    1      1    0⎤
⎢                                 ⎥
⎢0  1  -1  2   -2   1/2   -1/2   0⎥
⎢                                 ⎥
⎢0  1  1   4    4   1/4    1/4   0⎥
⎢                                 ⎥
⎢0  1  -1  8   -8   1/8   -1/8   0⎥
⎢                                 ⎥
⎢0  1  1   16  16   1/16  1/16   0⎥
⎢                                 ⎥
⎣0  1  -1  32  -32  1/32  -1/32  1⎦

G = 
⎡ 1      0     0  ⎤
⎢                 ⎥
⎢-2/9  -2/9   -2/9⎥
⎢                 ⎥
⎢-2/9   2/9   -2/9⎥
⎢                 ⎥
⎢1/90  1/45   2/45⎥
⎢                 ⎥
⎢1/90  -1/45  2/45⎥
⎢                 ⎥
⎢ 32    16        ⎥
⎢ ──    ──    8/45⎥
⎢ 45    45        ⎥
⎢                 ⎥
⎢ 32   -16        ⎥
⎢ ──   ────   8/45⎥
⎢ 45    45        ⎥
⎢                 ⎥
⎣ 0      0     1  ⎦

BT = 
⎡1   0    -21/4    0    21/4     0    -1  0⎤
⎢                                          ⎥
⎢0   1      1    -17/4  -17/4    1    1   0⎥
⎢                                          ⎥
⎢0   -1     1    17/4   -17/4   -1    1   0⎥
⎢                                          ⎥
⎢0  1/2    1/4   -5/2   -5/4     2    1   0⎥
⎢                                          ⎥
⎢0  -1/2   1/4    5/2   -5/4    -2    1   0⎥
⎢                                          ⎥
⎢0   2      4    -5/2    -5     1/2   1   0⎥
⎢                                          ⎥
⎢0   -2     4     5/2    -5    -1/2   1   0⎥
⎢                                          ⎥
⎣0   -1     0    21/4     0    -21/4  0   1⎦

AT*((G*g)(BT*d)) =
⎡d[0]⋅g[0] + d[1]⋅g[1] + d[2]⋅g[2]⎤
⎢                                 ⎥
⎢d[1]⋅g[0] + d[2]⋅g[1] + d[3]⋅g[2]⎥
⎢                                 ⎥
⎢d[2]⋅g[0] + d[3]⋅g[1] + d[4]⋅g[2]⎥
⎢                                 ⎥
⎢d[3]⋅g[0] + d[4]⋅g[1] + d[5]⋅g[2]⎥
⎢                                 ⎥
⎢d[4]⋅g[0] + d[5]⋅g[1] + d[6]⋅g[2]⎥
⎢                                 ⎥
⎣d[5]⋅g[0] + d[6]⋅g[1] + d[7]⋅g[2]⎦

Citing wincnn

If you use wincnn in your research, please cite the software:

@software{lavin_wincnn,
  author       = {Lavin, Andrew},
  title        = {wincnn},
  year         = {2016},
  version      = {2.0.1},
  url          = {https://github.com/andravin/wincnn},
  license      = {Apache-2.0}
}

Reference

[1] "Fast Algorithms for Convolutional Neural Networks" Lavin and Gray, CVPR 2016. http://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Lavin_Fast_Algorithms_for_CVPR_2016_paper.pdf

Nearby in the ranking
Similar items