# An Autoencoder-Based Task-Oriented Semantic Communication System for M2M Communication
## 3 Proposed Autoencoder-Based Image Transmission System
### Semantic Encoder Architecture  
Figure 2 presents the proposed encoder used in the autoencoder. As shown in the figure, the first layer of the encoder is a convolution layer with 32 filters (kernels), having dimensions of \(3\times 3\) with one channel. The combination and nature of convolutional layers,  
\begin{table}
\begin{tabular}{p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt}} \hline \hline
**Reference** & **Data Type** & **Model** & \begin{tabular}{c} **Features of the** \\ **System** \\ \end{tabular} & **Pros** & **Cons** \\ \hline \hline \multirow{4}{*}{\
\begin{tabular}{} \end{tabular} } & \multirow{4}{*}{Text} & \multirow{4}{*}{Text} & Introduces relay channels for better transmission in semantic communication systems systems & Improves transmission reliability over long distances, reduces semantic errors & Increased complexity due to relay channel coordination system \\ \hline \multirow{4}{*}{
\begin{tabular}{} \end{tabular} } & \multirow{4}{*}{Digital Symbols} & \multirow{4}{*}{Digital Symbols} & \multirow{4}{*}{Variational Autoencoder} & Jointly optimize coding and modulation using variational inference to maximize mutual information & Robust against channel noise, improves semantic and data recovery design \\ \cline{1-1} \cline{3-4}  & & & & \\ \cline{1-1} \cline{3-4}  & & & & \\ \cline{1-1} \cline{3-4}  & & & & \\ \cline{1-1} \cline{3-4}  & & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: _Cont._max pooling layers, activation functions, dense layers, and vector spaces are optimized for the application under consideration to minimize system resource usage. Padding is added to the input volume as the \"same\" value, and the stride of the convolution operation is set to 1 such that the output volume has the same spatial dimensions as the input volume. Max pooling is used next with a pool size of \(2\times 2\). It decreases feature maps by a factor of two in both height and width dimensions. This is considered the first convolutional layer up to this point. During the second convolutional layer, 64 filters that have the dimensions of \(3\times 3\) with 32 channels are employed. The use of 64 filters in the second convolutional layer will improve the ability to extract high-level features from the input data. As the network grows, the number of functions learned at each layer becomes more abstract and advanced. More filters in the second convolutional layer allow the network to capture more complex and detailed features in the input data. Similar to the first convolutional layer, max pooling is performed on the second convolutional layer, and the feature maps are downsampled to a size of \(7\times 7\) with 64 channels. The flatten function is used to convert the output of the second convolutional layer into a one-dimensional array with the shape of 3136 by 1, which can then be fed into the fully connected layers. Finally, another dense layer is created as the bottleneck (latent vector) of the autoencoder with the ReLU activation function, which produces the final encoded representation with a shape of \(32\times 1\). Though several images are analyzed, within the presentation of this paper, only \(28\times 28\) images from the MISNT [31] dataset are considered. The keras [32] library is used to implement the autoencoder in Python.