CNN-based image encoder for visual feature extraction. More...


Public Member Functions | |
| __init__ (self, input_channels, output_dim) | |
| Constructor for ImageEncoder class. | |
| forward (self, x) | |
| Forward pass through the image encoder. | |
Public Attributes | |
| conv1 | |
| pool1 | |
| conv2 | |
| pool2 | |
| conv3 | |
| pool3 | |
| adaptive_pool | |
| fc | |
CNN-based image encoder for visual feature extraction.
This class implements a simple CNN architecture for encoding images into fixed-dimensional feature vectors.
Simple CNN based image encoder.
| eaml.ImageEncoder.__init__ | ( | self, | |
| input_channels, | |||
| output_dim | |||
| ) |
Constructor for ImageEncoder class.
| input_channels | Number of input channels (1 for grayscale, 3 for RGB) |
| output_dim | Dimension of the output feature vector |
| eaml.ImageEncoder.forward | ( | self, | |
| x | |||
| ) |
Forward pass through the image encoder.
| x | Input tensor of shape (batch_size, channels, height, width) |
| eaml.ImageEncoder.adaptive_pool |
| eaml.ImageEncoder.conv1 |
| eaml.ImageEncoder.conv2 |
| eaml.ImageEncoder.conv3 |
| eaml.ImageEncoder.fc |
| eaml.ImageEncoder.pool1 |
| eaml.ImageEncoder.pool2 |
| eaml.ImageEncoder.pool3 |