Fading Coder

One Final Commit for the Last Sprint

Installing PyTorch with CUDA 11.0 and cuDNN on Windows 10

Compatibility Between Driver, CUDA, and cuDNN On Windows 10, verify the installed NVIDIA driver via the Control Panel: open NVIDIA Control Panel → Help → System Information and note the driver version under Components. The CUDA Toolkit is a parallel computing framework for NVIDIA GPUs and ships with...

Binary Classification Loss Functions in PyTorch: BCEWithLogitsLoss vs. CrossEntropyLoss

When constructing a binary classification model in PyTorch, three primary configurations exist for the final layer, activation, and loss function: torch.nn.Linear + torch.sigmoid + torch.nn.BCELoss; torch.nn.Linear + torch.nn.BCEWithLogitsLoss; and torch.nn.Linear (with output dimension of 2) + torc...

Implementing a COVID-19 Prediction Model with PyTorch: From Data Loading to Model Evaluation

This guide walks through the implementation of a neural network-based regression model for predicting COVID-19 cases using PyTorch. We cover custom dataset creation, model architecture design, training loops with validation, and inference export. Prerequisites First, import the required libraries fo...

Resolving PyTorch CUDA Compatibility Errors for RTX 40-Series GPUs (sm_89)

Error Details UserWarning: NVIDIA GeForce RTX 4060 Laptop GPU with CUDA capability sm_89 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37. If you want to use the NVIDIA GeForce RTX 4060 Lapt...

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...