Fading Coder

One Final Commit for the Last Sprint

Automated Diabetic Retinopathy Grading via Deep Neural Networks and Traditional Machine Learning

Dataset Characteristics and Preprocessing The dataset comprises 1000 fundus photographs categorized into four severity levels of diabetic retinopathy. Initial exploratory analysis revealed significant class imbalance across the severity grades. Too mitigate this, targeted augmentation strategies wer...

Setting Up PyTorch with MPS GPU Support on Apple Silicon Macs and Integrating with PyCharm

Install Anaconda for ARM64 Architecture Download and install the ARM64 version of Anaconda from the official site: https://www.anaconda.com/products/distribution#Downloads Verify the installation by running: conda info Check the system platform to confirm compatibility: import platform print(platfor...

Implementing Cat and Dog Image Classification with PyTorch

The task of distinguishing cats from dogs originates from a beginner-level Kaggle competition titled Dogs vs Cats. To gain deeper insights into Convolutional Neural Networks (CNNs), several classic models like LeNet, AlexNet, and ResNet were implemented using PyTorch. This exploration investigates h...

Implementation of Convolution Kernels for Convolutional Neural Networks

2D Cross-Correlation Calculatoin import torch from torch import nn def compute_2d_cross_corr(input_tensor, kernel): """Execute 2D cross-correlation operation""" kernel_h, kernel_w = kernel.shape output_h = input_tensor.shape[0] - kernel_h + 1 output_w = input_tensor.sha...

Terminology-Constrained Neural Machine Translation: From GRU Seq2Seq to Transformer Architectures

Machine translation systems have evolved from rule-based approaches through statistical methods to modern neural architectures. Current research emphasizes context-aware translation, domain adaptation, and terminology-constrained generation to ensure specialized vocabulary accuracy in professional d...

Converting PyTorch Models to TorchScript for Production Deployment

TorchScript enables PyTorch models to be converted into a format that can run independently of Python. This allows models to be deployed in production environments, including servers without Python runtime. Two primary methods exist for converting PyTorch models to TorchScript: tracing and scripting...

Analyzing PyTorch GPU Memory Usage with Snapshot Tools

GPU memory snapshot tools in PyTorch enable detailed analysis of memory allocation and deallocation events during model execution. These tools help diagnose common issues such as out-of-memory (OOM) errors and provide insights into memory consumption patterns. Core Functions PyTorch provides interna...

Implementing mean Average Precision (mAP) for Object Detection in PyTorch

mAP (mean Average Precision) is a standard metric for evaluating object detectors. It summarizes precision–recall tradeoffs across cateegories, optionally averaged over multiple IoU thresholds. Precision = TP / (TP + FP) Recall = TP / (TP + FN) AP (per class) = area under the precision–recall curve...

Building PyTorch with CUDA Support for Legacy GPUs on Windows

PyTorch binaries after 1.3 dropped support for GPUs with compute capability 3.5 and below, and by 1.7 the prebuilt wheels target compute capability 5.2 or higher. If you have an older GPU (for example, a Kepler device like GT 730M with CC 3.5) and still want GPU acceleration, you can compile PyTorch...