Robots Atlas>ROBOTS ATLAS

Transformer from Scratch · PyTorch for Sequence Models

3D Tensors: Batch, Sequence, Features

PyTorch for Sequence Models

Introduction

In a Transformer, most data is represented as 3D tensors. This lesson teaches how to read the batch, sequence and feature dimensions and preserve their meaning in PyTorch code.