Fading Coder

One Final Commit for the Last Sprint

Computing Squared Euclidean Distances Between Point Sets in PointNet++

Computing Pairwise Squared Euclidean Distances def square_distance(src, dst): """ Compute squared Euclidean distances between each pair of points from two sets. The formula used is: ||a - b||^2 = ||a||^2 + ||b||^2 - 2 * a^T * b Input: src: source points, [B, N, C] dst: target points,...

Building a Terminology-Aware Machine Translation Model: A Datawhale NLP Task Guide

This Datawhale NLP challenge focuses on enhancing machine translation through terminology dictionary integration. The goal is to improve translation accuracy for domain-specific termss by leveraging curated term mappings between source and target languages. Key NLP Task Categories Sequence Labeling:...

Hybrid Parallelism Strategies for Large-Scale Deep Learning Training

Hybrid parallelism is a foundational technique in large-scale distributed deep learning, designed to orchestrate multiple parallelization dimensions—data, tensor, and pipeline—to maximize hardware utilization while scaling training across thousands of accelerators. Unlike monolithic parallel approac...

Understanding 1D, 2D, and 3D Convolution Layers

Understanding dilation in convolution operations: https://blog.csdn.net/weixin_42363544/article/details/123920699 Dilated convolution, also known as hole convolution. In PyTorch, a dilation value of 1 corresponds to a standard convolution without dilation. When dilation is 1, each element in the ker...

Implementing Sparse Mixture of Experts from Scratch

Data Preparasion Import Required Packages # Import required packages and set seed for reproducibility import torch import torch.nn as nn from torch.nn import functional as F torch.manual_seed(42) Download Shakespeare Dataset # Downloading the tiny shakespeare dataset # !wget https://raw.githubuserco...

Setting Up ComfyUI with GPU Support on Windows 10

Installing Python 3.10.11 Download the official Python 3.10.11 installer for Windows (64-bit) named something like python-3.10.11-amd64.exe. Run the installer using custom installation options and set your desired installation path. Add both the main Python directory and the Scripts subfolder to the...

Tracking Training Progress: Plotting Loss and Accuracy Curves in PyTorch

Visualizing training and testing metrics through Loss and Accuracy curves provides immediate insight into whether your model is learning effectively. Metric Description **Loss Curve** Represents the model's error during training and evaluation. Lower values indicate better performance. **Accuracy Cu...

Tensor Manipulation in PyTorch: Splitting, Expanding, and Modifying Operations

Tensor Manipulation in PyTorch: Splitting, Expanding, and Modifying Operations
Introduction This article covers tensor manipulation operations in PyTorch, including splitting (split, unbind, chunk), expanding (repeat, cat, stack), and modifying (using indexing and slicing, gather, scatter). Experimental Enviroment This series of experiments uses the following environment setup...

Implementing Neural Architectures with PyTorch

The torch.nn namespace encapsulates essential building blocks for constructing deep learning pipelines. These modules accept Tensor inputs, perform computations to generate outputs, and maintain internal parameters. Users typical construct models using either the functional API with nn.Sequential or...

Building GoogLeNet and ResNet Architectures in PyTorch

The Inception architecture processes feature maps through parallel convolutional branches with varying receptive fields. In PyTorch, an InceptionModule can be constructed by defining four distinct pathways: a standalone 1×1 convolution, a 5×5 convolution preceded by a bottleneck layer, a cascade of...