{"id":13819572,"url":"https://github.com/xingyul/sparse-winograd-cnn","last_synced_at":"2025-05-16T04:34:06.899Z","repository":{"id":174305793,"uuid":"119251256","full_name":"xingyul/sparse-winograd-cnn","owner":"xingyul","description":"Efficient Sparse-Winograd Convolutional Neural Networks (ICLR 2018)","archived":false,"fork":false,"pushed_at":"2019-05-07T07:49:24.000Z","size":224,"stargazers_count":190,"open_issues_count":0,"forks_count":47,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-19T18:49:16.908Z","etag":null,"topics":["convolution","convolutional-neural-networks","network-pruning","tensorflow","winograd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xingyul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-28T11:12:18.000Z","updated_at":"2024-10-09T03:14:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"eca28d0b-14a0-4c5f-95b4-57cfd75310f9","html_url":"https://github.com/xingyul/sparse-winograd-cnn","commit_stats":null,"previous_names":["xingyul/sparse-winograd-cnn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingyul%2Fsparse-winograd-cnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingyul%2Fsparse-winograd-cnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingyul%2Fsparse-winograd-cnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingyul%2Fsparse-winograd-cnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xingyul","download_url":"https://codeload.github.com/xingyul/sparse-winograd-cnn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254470303,"owners_count":22076566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convolution","convolutional-neural-networks","network-pruning","tensorflow","winograd"],"created_at":"2024-08-04T08:00:50.331Z","updated_at":"2025-05-16T04:34:05.395Z","avatar_url":"https://github.com/xingyul.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Efficient Sparse-Winograd Convolutional Neural Networks\nThis is the code and models for paper \u003ca href=\"https://openreview.net/forum?id=HJzgZ3JCW\" target=\"_blank\"\u003eEfficient Sparse-Winograd Convolutional Neural Networks\u003c/a\u003e by \u003ca href=\"https://stanford.edu/~xyl\" target=\"_blank\"\u003eXingyu Liu\u003c/a\u003e et al.\n\n![architecture](https://github.com/xingyul/sparse-winograd-cnn/blob/master/doc/teaser.png)\n\n### Introduction\nThis work is based on our ICLR 2018 paper. We propose modifications to Winograd-based CNN architecture to enable operation savings from Winograd’s minimal filtering algorithm and network pruning to be combined. \n\nConvolutional Neural Networks (CNNs) are computationally intensive, which limits their application on mobile devices. Their energy is dominated by the number of multiplies needed to perform the convolutions. Winograd’s minimal filtering algorithm and network pruning can reduce the operation count, but these two methods cannot be straightforwardly combined — applying the Winograd transform fills in the sparsity in both the weights and the activations. We propose two modifications to Winograd-based CNNs to enable these methods to exploit sparsity. \n\nIn this repository, we release code and data for training Winograd-ReLU CNN on ImageNet as well as pre-trained and iteratively pruned Winograd-ReLU models.\n\n### Citation\nIf you find our work useful in your research, please cite:\n\n    @article{liu:2018:Winograd,\n      title={Efficient Sparse-Winograd Convolutional Neural Networks},\n      author={Xingyu Liu and Jeff Pool and Song Han and William J. Dally},\n      journal={International Conference on Learning Representations (ICLR)},\n      year={2018}\n    }\n   \n### Installation\n\nInstall \u003ca href=\"https://www.tensorflow.org/get_started/os_setup\" target=\"_blank\"\u003eTensorFlow\u003c/a\u003e and \u003ca href=\"https://github.com/ppwwyyxx/tensorpack\" target=\"_blank\"\u003eTensorpack\u003c/a\u003e. The code has been tested with Python 2.7, TensorFlow 1.3.0, CUDA 8.0 and cuDNN 5.1 on Ubuntu 14.04.\n\nUsers may also need to download raw \u003ca href=\"http://image-net.org/\" target=\"_blank\"\u003eImageNet\u003c/a\u003e dataset for ImageNet experiments. Users should ensure that the \u003ca href=\"https://github.com/ppwwyyxx/tensorpack/tree/master/examples/ResNet\" target=\"_blank\"\u003eTensorpack ResNet example\u003c/a\u003e can run with ImageNet.\n\nInstall customized Tensorflow Op:\n\n    cd /path/to/Sparse-Winograd-CNN/winograd2x2_cublas\n    make\n    export PYTHONPATH=/path/to/Sparse-Winograd-CNN/winograd2x2_cublas:$PYTHONPATH\n\nUsers may also change the ``-arch`` flag in ``winograd2x2_cublas/winograd2x2_imTrans/Makefile`` and ``winograd2x2_cublas/winograd2x2_conv/Makefile`` to suit their GPU computing capability.\n\nPut ``ResNet-18-var/winograd_conv.py`` and ``ResNet-18-var/winograd_imtrans.py`` into the cloned ``tensorpack/models`` directory.\n\n### Usage\n\nTo train the Winograd-ReLU CNN from scratch on ImageNet with GPU 0 and 1:\n\n    ./imagenet-resnet-transWino-prune.py --gpu 0,1 --data /path/to/dataset/imagenet\n\nTo use pre-trained model or test with pruned model, download the \u003ca href=\"https://drive.google.com/drive/folders/1YA3syxt5yzBiRiwW_dswc5YmRg4p4vdG?usp=sharing\" target=\"_blank\"\u003emodels\u003c/a\u003e. Then run with command:\n\n    ./imagenet-resnet-transWino-prune.py --gpu 0,1 --data /path/to/dataset/imagenet --load /path/to/model-name.data-00000-of-00001\n\nWe also provided scripts for pruning, retraining and viewing the model: ``ResNet-18-var/prune_sh.sh``, ``retrain_sh.sh`` and ``view_sh.sh``.\n\n### License\nOur code is released under MIT License (see LICENSE file for details).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxingyul%2Fsparse-winograd-cnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxingyul%2Fsparse-winograd-cnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxingyul%2Fsparse-winograd-cnn/lists"}