Rico's Nerd Cluster

「离开世界之前 一切都是过程」

[Going Back To The Classics] DFT, FFT, Cross-Correlation

DFT, Inverse DFT, FFT Even-Odd Split, Twiddle Factors, Circular Cross-Correlation

1. DFT: Time Domain → Frequency Domain The Fourier transform says any time-domain signal can be decomposed into waves of different frequencies. Let’s walk through the DFT with a simple example....

[SLAM] INS Correction Graph With A Gauss-Markov Prior

Correction Nodes, Gauss-Markov Edges, Sonar Loop Closures, Stationary Variance, Information Matrix

Nodes Are Pose Corrections, Not Poses In traditional SLAM, a node contains an unknown robot pose: \[\begin{gather*} x_k=(x,y,\theta) \end{gather*}\] The INS already provides poses, so this graph...

[Robotics] Handling Truncated Objects In Detection

Truncation Ratio, Truncation Augmentation, Separate Metrics

A truncated object is one that is only partially inside the sensor’s field of view. Its crop doesn’t look like a fully seen object, so it can confuse both training and evaluation. How Public Datas...

Deep Learning - Grad-CAM

A Step-by-Step Example with a Tiny Neural Network

Grad-CAM (Gradient-weighted Class Activation Mapping) is a technique for understanding which spatial regions of an image contribute to a neural network’s classification. Suppose we train a neural n...

Deep Learning - Integrated Gradients

A Step-by-Step Example with a Tiny Neural Network

Integrated Gradients (IG) explains a neural network’s prediction by estimating how much each input feature contributes to a score relative to a chosen baseline input. For an image classifier, it an...

Deep Learning - Learning Rate Schedules

Warmup, LambdaLR, Cosine Decay, Cosine Annealing, SGDR

Consider gradient descent: \[\theta_{t+1}=\theta_t-\eta_t\nabla L(\theta_t)\] Where: θ_t: model parameters at step t η_t: learning rate at step t ∇L: gradient of the loss Warmup Warmup...

Deep Learning - Truncated Normal Distribution

Rejection Sampling, trunc_normal_, ViT Positional Embedding Initialization

A truncated normal distribution is a normal distribution restricted to an interval [a, b]: values outside it are never produced. 1. Rejection Sampling Example Suppose we draw these eight values f...

Deep Learning - Why 100 GB of NumPy Data Slowed Down Our ML Training

NumPy Memory Mapping, Linux Page Cache, Swap, Pause and Resume, and Ragged Arrays

1. The Problem Suppose we’re training a 3D LiDAR object recognition model to detect cars, pedestrians, and cyclists. We have three training configurations: centred crops, shifted crops, and tempor...

Deep Learning - Contrastive Learning

Supervised Contrastive Learning (SupCon)

Supervised contrastive learning (SupCon) trains a model to produce embeddings in which images of the same class are close together and images of different classes are far apart. Ordinary classifica...

Deep Learning - Flash Attention

IO-Aware Attention, Tiling, Online Softmax

What FlashAttention Does FlashAttention computes exact attention without storing the huge \(N\times N\) attention matrix: \[\operatorname{Attention}(Q,K,V) = \operatorname{softmax}\left(\frac{QK^...