{"id":24740790,"url":"https://github.com/yukkyo/pytorch-filterresponsenormalizationlayer","last_synced_at":"2025-10-10T09:31:38.159Z","repository":{"id":85357978,"uuid":"225321601","full_name":"yukkyo/PyTorch-FilterResponseNormalizationLayer","owner":"yukkyo","description":"PyTorch implementation of \"Filter Response Normalization Layer: Eliminating Batch Dependence in the Training of Deep Neural Networks\"","archived":false,"fork":false,"pushed_at":"2019-12-30T05:37:43.000Z","size":41,"stargazers_count":84,"open_issues_count":3,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-10-20T23:58:12.522Z","etag":null,"topics":["batchnorm2d","catalyst","deep-neural-networks","frn","python","pytorch"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1911.09737","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yukkyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-12-02T08:19:02.000Z","updated_at":"2023-10-20T23:58:12.886Z","dependencies_parsed_at":"2023-03-03T06:00:44.512Z","dependency_job_id":null,"html_url":"https://github.com/yukkyo/PyTorch-FilterResponseNormalizationLayer","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukkyo%2FPyTorch-FilterResponseNormalizationLayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukkyo%2FPyTorch-FilterResponseNormalizationLayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukkyo%2FPyTorch-FilterResponseNormalizationLayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukkyo%2FPyTorch-FilterResponseNormalizationLayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yukkyo","download_url":"https://codeload.github.com/yukkyo/PyTorch-FilterResponseNormalizationLayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235941497,"owners_count":19069659,"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":["batchnorm2d","catalyst","deep-neural-networks","frn","python","pytorch"],"created_at":"2025-01-27T23:39:55.836Z","updated_at":"2025-10-10T09:31:32.850Z","avatar_url":"https://github.com/yukkyo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PyTorch-Filter Response Normalization Layer(FRN)\n\nPyTorch implementation of Filter Response Normalization Layer(FRN)\n\n[\\[1911\\.09737\\] Filter Response Normalization Layer: Eliminating Batch Dependence in the Training of Deep Neural Networks](https://arxiv.org/abs/1911.09737)\n\n## 0. How to apply FRN to your model\n\nReplace `BatchNorm2d + ReLU` in the model with `FRN + TLU` yourself.\nCurrently, it is difficult to easily replace them with functions.\nBecause many models use the same ReLU in various places.\n\n\n## 1. Experiment(Classification)\n\nWe use [Best Artworks of All Time \\| Kaggle](https://www.kaggle.com/ikarus777/best-artworks-of-all-time) dataset.\nThis dataset contains 49 artists and their pictures.  \nIn this experiment, we classify artist by picture.\n\n\n### 1.0 Assumed libraries\n\n- torch==1.3.1\n- catalyst==19.11.6\n- albumentations==0.4.3\n- [NVIDIA/apex](https://github.com/NVIDIA/apex)\n  - If you use `--fp16` option\n\n### 1.1 Get dataset\n\nIf you can use kaggle API command, you can download easily\n\n```bash\n$ cd input\n$ kaggle datasets download -d ikarus777/best-artworks-of-all-time\n$ unzip best-artworks-of-all-time.zip -d artworks\n```\n\nOr download directly from [Best Artworks of All Time \\| Kaggle](https://www.kaggle.com/ikarus777/best-artworks-of-all-time)\n\n\nI assume the following directory structure.\n\n```text\ninput\n├── artworks\n│   ├── artists.csv\n│   ├── images\n│   │   └── images\n│   │       ├── Alfred_Sisley\n│   │       │   ├── Alfred_Sisley_1.jpg\n│   │       │   ├── Alfred_Sisley_10.jpg\n│   │       │   ├── ...\n```\n\n### 1.2 Train(and Valid)\n\nYou can use `--fp16` if you installed `nvidia/apex`.\nBut FRN is not tuned for FP16, you should turn off `--fp16` when use `--frn`.\n\n```bash\n$ python train_cls.py --fp16\n$ python train_cls.py --frn\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukkyo%2Fpytorch-filterresponsenormalizationlayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukkyo%2Fpytorch-filterresponsenormalizationlayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukkyo%2Fpytorch-filterresponsenormalizationlayer/lists"}