torch-resnet


Nametorch-resnet JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/raphaelreme/torch-resnet
SummaryResnet implementation in pytorch
upload_time2022-11-21 17:17:07
maintainer
docs_urlNone
authorRaphael Reme
requires_python>=3.6
licenseMIT
keywords deep learning pytorch resnet
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # torch-resnet

Unified torch implementation of Resnets with or without pre-activation/width.

This implementation propose Resnets both for small and "large" images (Cifar vs ImageNet)
and implements all the model used in the papers introducing the ResNets.
Additional models can easily be created using the default class ResNet or PreActResNet.
It is also possible to create your own block following the same model as those implemented.

## Install

```bash
$ pip install torch-resnet
```


## Getting started

```python
import torch

import torch_resnet
from torch_resnet.utils import count_layer

model = torch_resnet.PreActResNet50()  # Build a backbone Resnet50 with pre-activation
model.set_head(nn.Linear(model.out_planes, 10))  # Set a final linear head

count_layers(model)  # -> 54 (In the original paper they do not count shortcut/downsampling layers)

out = model(torch.randn(1, 3, 224, 224))
```

## Results

Work in progress

## References

* [1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
    Deep Residual Learning for Image Recognition. https://arxiv.org/pdf/1512.03385
* [2] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
    Identity Mappings in Deep Residual Networks. https://arxiv.org/pdf/1603.05027
* [3] Sergey Zagoruyko, Nikos Komodakis
    Wide Residual Networks. https://arxiv.org/pdf/1605.07146

## Build and Deploy

```bash
$ python -m build
$ python -m twine upload dist/*
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/raphaelreme/torch-resnet",
    "name": "torch-resnet",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Deep Learning,PyTorch,Resnet",
    "author": "Raphael Reme",
    "author_email": "raphaelreme-dev@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5d/cb/f9346b3ce876d45349fa6a7684e75d02da6c88b93f58caa67090c2c4daf2/torch-resnet-0.0.1.tar.gz",
    "platform": null,
    "description": "# torch-resnet\n\nUnified torch implementation of Resnets with or without pre-activation/width.\n\nThis implementation propose Resnets both for small and \"large\" images (Cifar vs ImageNet)\nand implements all the model used in the papers introducing the ResNets.\nAdditional models can easily be created using the default class ResNet or PreActResNet.\nIt is also possible to create your own block following the same model as those implemented.\n\n## Install\n\n```bash\n$ pip install torch-resnet\n```\n\n\n## Getting started\n\n```python\nimport torch\n\nimport torch_resnet\nfrom torch_resnet.utils import count_layer\n\nmodel = torch_resnet.PreActResNet50()  # Build a backbone Resnet50 with pre-activation\nmodel.set_head(nn.Linear(model.out_planes, 10))  # Set a final linear head\n\ncount_layers(model)  # -> 54 (In the original paper they do not count shortcut/downsampling layers)\n\nout = model(torch.randn(1, 3, 224, 224))\n```\n\n## Results\n\nWork in progress\n\n## References\n\n* [1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun\n    Deep Residual Learning for Image Recognition. https://arxiv.org/pdf/1512.03385\n* [2] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun\n    Identity Mappings in Deep Residual Networks. https://arxiv.org/pdf/1603.05027\n* [3] Sergey Zagoruyko, Nikos Komodakis\n    Wide Residual Networks. https://arxiv.org/pdf/1605.07146\n\n## Build and Deploy\n\n```bash\n$ python -m build\n$ python -m twine upload dist/*\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Resnet implementation in pytorch",
    "version": "0.0.1",
    "split_keywords": [
        "deep learning",
        "pytorch",
        "resnet"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "83cccb08e7bf11d68463cb2d3354eda365ca97fd69e1b7300dac00f45e137023",
                "md5": "53c771bf14c99cb31ccbaebd08f91c26",
                "sha256": "cc6b972a76131322752dc21b3e432c462a6d0b071f73f1b608271ce40d3602c6"
            },
            "downloads": -1,
            "filename": "torch_resnet-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "53c771bf14c99cb31ccbaebd08f91c26",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 10195,
            "upload_time": "2022-11-21T17:17:05",
            "upload_time_iso_8601": "2022-11-21T17:17:05.989648Z",
            "url": "https://files.pythonhosted.org/packages/83/cc/cb08e7bf11d68463cb2d3354eda365ca97fd69e1b7300dac00f45e137023/torch_resnet-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5dcbf9346b3ce876d45349fa6a7684e75d02da6c88b93f58caa67090c2c4daf2",
                "md5": "f44c0552525b3244c5c8f56ea99fb979",
                "sha256": "b059b03ea12a4f8c1aafcca55cbfdc2bd22fecf5fb674c5a80d8ffdecf5305a0"
            },
            "downloads": -1,
            "filename": "torch-resnet-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f44c0552525b3244c5c8f56ea99fb979",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7990,
            "upload_time": "2022-11-21T17:17:07",
            "upload_time_iso_8601": "2022-11-21T17:17:07.651541Z",
            "url": "https://files.pythonhosted.org/packages/5d/cb/f9346b3ce876d45349fa6a7684e75d02da6c88b93f58caa67090c2c4daf2/torch-resnet-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-11-21 17:17:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "raphaelreme",
    "github_project": "torch-resnet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "torch-resnet"
}
        
Elapsed time: 0.02606s