# Getting Started Source: https://www.tensorplay.cn/docs/guide/index.html This guide is the fastest path from “I just installed TensorPlay” to “I trained a model.” It is organized as a small series of lessons, each short enough to read and run in one sitting. Every example is copy-paste runnable against an installed TensorPlay. - [Tensors](/docs/guide/tensors.html) - [Datasets and DataLoaders](/docs/guide/datasets.html) - [Transforms](/docs/guide/transforms.html) - [Models](/docs/guide/models.html) - [Autograd](/docs/guide/autograd.html) - [Training](/docs/guide/training.html) - [Save and Load the Model](/docs/guide/saveload.html) ## The path Follow the pages in order. Each one builds on the previous. - [Tensors](/docs/guide/tensors.html) — create, inspect, index, and do math with tensors. - [Datasets and DataLoaders](/docs/guide/datasets.html) — organize data and stream it in batches. - [Transforms](/docs/guide/transforms.html) — preprocess and augment data before it reaches a model. - [Models](/docs/guide/models.html) — build a neural network with nn.Module. - [Autograd](/docs/guide/autograd.html) — make tensors learnable and get gradients automatically. - [Training](/docs/guide/training.html) — the loss + optimizer + loop that makes the model learn. - [Save and Load](/docs/guide/saveload.html) — keep the trained weights and checkpoints. After those seven lessons you can train, evaluate, and persist a real model. ## What TensorPlay is TensorPlay is a tensor library for deep learning. It gives you three things you will use on every line of code: - Tensors — multi-dimensional arrays that carry a device, a data type, and support efficient vectorized math (tensorplay.Tensor). - Automatic differentiation — every operation records itself into a graph, so for any scalar loss you can call loss.backward() and get the gradient of that loss with respect to every tensor that was involved (tensorplay.autograd). - A neural-network toolkit — layers and models expressed as tensorplay.nn.Module, optimizers such as SGD and Adam (tensorplay.optim), vision transforms (tensorplay.vision.transforms), and data helpers such as DataLoader and TensorDataset (tensorplay.utils.data). A defining design choice: the engine is explicit and readable. The graph that backward() walks is real code you can step through, which makes TensorPlay a good place to learn how the machinery works, not just to use it. ## Install and check it works You can install the latest release, or build from source. See the [README](https://github.com/lexing-2026/TensorPlay/blob/main/README.md) for the full install options including GPU variants. Once installed, run this smoke test: ``` import tensorplay as tp x = tp.tensor([1.0, 2.0, 3.0], requires_grad=True) y = (x * x).sum() y.backward() print(x.grad) # tensor([2., 4., 6.]) ``` If that prints 2 4 6 as a gradient, your installation is working. ## Where to go next - API reference — every function and class, grouped by area. Start at [tensorplay](/docs/tensorplay.html) for the core tensor API, then [nn](/docs/nn.html) for layers and losses, and [optim](/docs/optim.html) for optimizers. - Deep-dive notes — the [notes](/docs/notes/index.html) section explains the concepts behind the code: how autograd builds its graph, broadcasting rules, serialization, randomness, and more.