Practical overview
When it fits
Use it when a Keras image-classification project needs SE blocks or builders for the listed SE network families.
Who it is for
- Keras developers building or experimenting with image-classification architectures.
- Researchers comparing squeeze-and-excitation variants across ResNet, Inception and ResNeXt families.
Documented uses
- Add a squeeze-and-excitation block to a Keras image model.
- Build a preconfigured SE-ResNet or construct a custom SE-ResNet.
- Experiment with SE-Inception, SE-ResNeXt or the additional SE-MobileNet and SE-DenseNet variants.
Requirements & limits
The public repository specifies an MIT license.
- The README describes the implementation as targeting Keras 2.0.3 and later.
- The SE-MobileNet and SE-DenseNet variants are identified as additional models, not from the cited paper; the README does not verify their performance benefit.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Implement a squeeze-and-excitation block in Keras
Add channel-wise squeeze-and-excitation scaling to a Keras feature tensor.
Before you start
- Keras 2.0.3 or later, as stated by the project.
- A feature tensor suitable for the documented GlobalAveragePooling2D, Reshape, Dense, and elementwise multiplication layers.
- The
se.pymodule, which the README identifies as the import location.
Steps
Import
squeeze_excite_blockfromse.py.Pass a feature tensor to
squeeze_excite_block; optionally set itsratioargument, which defaults to 16.Use the returned tensor, which is the input multiplied by learned sigmoid channel weights.
Expected outcome
A feature tensor scaled by channel-wise weights computed with global average pooling and two Dense layers.
Guide limitations
- The documented implementation uses the private-looking
init._keras_shapeattribute; no compatibility guidance for newer Keras versions is provided.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 November 2026
- Original website title
- titu1994/keras-squeeze-excite-network · Official homepage title · retained in its source language

