{"id":13499118,"url":"https://github.com/taki0112/SENet-Tensorflow","last_synced_at":"2025-03-29T03:32:21.014Z","repository":{"id":40685801,"uuid":"103622291","full_name":"taki0112/SENet-Tensorflow","owner":"taki0112","description":"Simple Tensorflow implementation of \"Squeeze and Excitation Networks\" using Cifar10 (ResNeXt, Inception-v4, Inception-resnet-v2)","archived":false,"fork":false,"pushed_at":"2018-08-14T04:34:37.000Z","size":464,"stargazers_count":755,"open_issues_count":15,"forks_count":268,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-03-28T16:11:13.696Z","etag":null,"topics":["densenet","inception","inception-resnet","resnext","senet","tensorflow"],"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/taki0112.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}},"created_at":"2017-09-15T06:29:00.000Z","updated_at":"2025-01-23T05:54:27.000Z","dependencies_parsed_at":"2022-08-30T16:12:56.979Z","dependency_job_id":null,"html_url":"https://github.com/taki0112/SENet-Tensorflow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taki0112%2FSENet-Tensorflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taki0112%2FSENet-Tensorflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taki0112%2FSENet-Tensorflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taki0112%2FSENet-Tensorflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taki0112","download_url":"https://codeload.github.com/taki0112/SENet-Tensorflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246135765,"owners_count":20729056,"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":["densenet","inception","inception-resnet","resnext","senet","tensorflow"],"created_at":"2024-07-31T22:00:29.259Z","updated_at":"2025-03-29T03:32:20.994Z","avatar_url":"https://github.com/taki0112.png","language":"Python","funding_links":[],"categories":["Papers\u0026Codes","DLA"],"sub_categories":["SENet"],"readme":"# SENet-Tensorflow\nSimple Tensorflow implementation of [Squeeze Excitation Networks](https://arxiv.org/abs/1709.01507) using **Cifar10** \n\nI implemented the following SENet\n* [ResNeXt paper](https://arxiv.org/abs/1611.05431)\n* [Inception-v4, Inception-resnet-v2 paper](https://arxiv.org/abs/1602.07261)\n\nIf you want to see the ***original author's code***, please refer to this [link](https://github.com/hujie-frank/SENet)\n\n\n\n## Requirements\n* Tensorflow 1.x\n* Python 3.x\n* tflearn (If you are easy to use ***global average pooling***, you should install ***tflearn***)\n\n## Issue\n### Image_size\n* In paper, experimented with *ImageNet*\n* However, due to **image size** issues in ***Inception network***, so I used ***zero padding*** for the Cifar10\n```python\ninput_x = tf.pad(input_x, [[0, 0], [32, 32], [32, 32], [0, 0]]) # size 32x32 -\u003e 96x96\n```\n### NOT ENOUGH GPU Memory\n* If not enough GPU memory, Please edit the code\n```python\nwith tf.Session() as sess : NO\nwith tf.Session(config=tf.ConfigProto(allow_soft_placement=True)) as sess : OK\n```\n\n## Idea\n### What is the \"SE block\" ?\n![senet](./assests/senet_block.JPG)\n```python\ndef Squeeze_excitation_layer(self, input_x, out_dim, ratio, layer_name):\n    with tf.name_scope(layer_name) :\n        squeeze = Global_Average_Pooling(input_x)\n\n        excitation = Fully_connected(squeeze, units=out_dim / ratio, layer_name=layer_name+'_fully_connected1')\n        excitation = Relu(excitation)\n        excitation = Fully_connected(excitation, units=out_dim, layer_name=layer_name+'_fully_connected2')\n        excitation = Sigmoid(excitation)\n\n        excitation = tf.reshape(excitation, [-1,1,1,out_dim])\n\n        scale = input_x * excitation\n\n        return scale\n```\n\n### How apply ? (Inception, Residual)\n\u003cdiv align=\"center\"\u003e\n   \u003cimg src=\"https://github.com/hujie-frank/SENet/blob/master/figures/SE-Inception-module.jpg\" width=\"420\"\u003e\n  \u003cimg src=\"https://github.com/hujie-frank/SENet/blob/master/figures/SE-ResNet-module.jpg\"  width=\"420\"\u003e\n\u003c/div\u003e\n\n### How *\"Reduction ratio\"* should I set?\n![reduction](./assests/ratio.JPG)\n* **original** refers to ***ResNet-50***\n\n## ImageNet Results\n### Benefits against Network Depth\n![depth](./assests/benefit.JPG)\n\n### Incorporation with Modern Architecture\n![incorporation](./assests/incorporation.JPG)\n\n### Comparison with State-of-the-art\n![compare](./assests/state_of_art.JPG)\n\n## Cifar10 Results\nWill be soon\n\n## Related works\n* [Densenet-Tensorflow](https://github.com/taki0112/Densenet-Tensorflow)\n* [ResNeXt-Tensorflow](https://github.com/taki0112/ResNeXt-Tensorflow)\n* [ResNet-Tensorflow](https://github.com/taki0112/ResNet-Tensorflow)\n\n## Reference\n* [Inception_korean](https://norman3.github.io/papers/docs/google_inception.html)\n\n## Author\nJunho Kim\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaki0112%2FSENet-Tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaki0112%2FSENet-Tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaki0112%2FSENet-Tensorflow/lists"}