Cancers have emerged as a significant concern due to their impact on public health and society. The examination and interpretation of tissue sections stained with Hematoxylin and Eosin (H&E) play a crucial role in disease assessment, particularly in cases like gastric cancer. Microsatellite instability (MSI) is suggested to contribute to the carcinogenesis of specific gastrointestinal tumors. However, due to the nonspecific morphology observed in H&E-stained tissue sections, MSI determination often requires costly evaluations through various molecular studies and immunohistochemistry methods in specialized molecular pathology laboratories. Despite the high cost, international guidelines recommend MSI testing for gastrointestinal cancers. Thus, there is a pressing need for a new diagnostic modality with lower costs and widespread applicability for MSI detection. This study aims to detect MSI directly from H&E histology slides in gastric cancer, providing a cost-effective alternative. The performance of well-known deep convolutional neural networks (DCNNs) and a proposed architecture are compared. Medical image datasets are typically smaller than benchmark datasets like ImageNet, necessitating the use of off-the-shelf DCNN architectures developed for large datasets through techniques such as transfer learning. Designing an architecture proportional to a custom dataset can be tedious and may not yield desirable results. In this work, we propose an automatic method to extract a lightweight and efficient architecture from a given heavy architecture (e.g., well-known off-the-shelf DCNNs) proportional to a specific dataset. To predict MSI instability, we extracted the MicroNet architecture from the Xception network using the proposed method and compared its performance with other well-known architectures. The models were trained using tiles extracted from whole-slide images, and two evaluation strategies, tile-based and whole-slide image (WSI)-based, were employed and comp