Robots Atlas>ROBOTS ATLAS

Neural Networks: From Fundamentals to Modern AI · PyTorch Environment and Tensor Foundations

Train/val/test cycle, metrics and working with GPU (AMP, mixed precision)

PyTorch Environment and Tensor Foundations

Introduction

This lesson closes the foundation chapter: what a complete training loop looks like from zero_grad to step, how to split data into train/val/test without leakage, which metrics to use for balanced versus imbalanced datasets, and how to use the GPU efficiently — including mixed precision (AMP) and GradScaler. Understanding this infrastructure is a prerequisite for every experiment — without it even the best network architecture will produce false results due to data leakage or diverge numerically in fp16.