pytorch

Convolutional neural networks for image classification in PyTorch

For image work, I start with a compact CNN before reaching for heavy pretrained models. That baseline helps confirm whether labels, normalization, and augmentation are sane. It also makes failure cases easier to explain because the model architecture

Custom Datasets and DataLoaders for robust training input pipelines

Input pipelines are part of the model system, not an afterthought. I keep dataset classes deterministic, move expensive transforms into explicit stages, and use DataLoader settings that match hardware limits. Good batching and collation logic can remo

A clean PyTorch training loop with validation and checkpoints

The training loop is where research code either becomes maintainable or turns into a mess. I keep it explicit: train phase, validation phase, scheduler step, metric tracking, and checkpoint saving. That structure pays off immediately when experiments

PyTorch tensor basics and automatic differentiation

I treat PyTorch tensors like the main vocabulary of deep learning work. Understanding device placement, shape semantics, and autograd is more important than memorizing model classes. Once that foundation is solid, debugging training loops gets much ea

Transfer learning with pretrained torchvision backbones

Transfer learning is the right default when labeled data is limited and time matters. I usually freeze the backbone first, train the head, then selectively unfreeze deeper layers if the domain gap justifies it. This strategy converges faster and is mu