# Agent brief: The LiteRT clothing pipeline

- **Lesson id:** 01
- **Goal:** Map the shared Fashion-MNIST model from Mac training through Linux conversion and Android LiteRT inference.
- **Prerequisites:** Read the course [SKILL.md](SKILL.md). Know basic Python and Kotlin.
- **Inputs:** Empty project directory and the Apple course comparison; [human lesson](01-the-pipeline.html).
- **Outputs/artifacts:** Named pipeline, fixed NCHW/float32/logit contract, and environment plan.

## Steps

1. Create a Python 3.11 `uv` project and run `uv venv`. Do not install CUDA.
2. Record four stages: Mac PyTorch, Linux `litert-torch`, APK asset, Android LiteRT `CompiledModel`.
3. Keep `[1, 1, 28, 28]` float32 input, `[1, 10]` logits, and the ten fixed labels.
4. Explain LiteRT as the current name that grew out of TFLite, and name `.tflite` as the model file.

## Constraints

Do not replace `CompiledModel` with the older `Interpreter`. Do not say the Linux converter is a Mac-only dependency. No unrelated files or secrets.

## Key concepts

- Four stages: Mac PyTorch training, Linux `litert-torch` conversion, APK asset, Android inference.
- LiteRT is the current name for Google's on-device runtime. The file is still `.tflite`.
- `CompiledModel` is the current Android API. This course does not use `Interpreter` for new code.
- Convert on Linux. Train and save `clothing.pt` on the Mac.

## Takeaways

- There is no ONNX step. The path is PyTorch to LiteRT Torch to `clothing.tflite`.
- Input is NCHW `[1, 1, 28, 28]`. Output is ten logits, not probabilities.
- You finish with a Kotlin screen that shows a label and confidence.

## Acceptance checks

The plan names Linux as the conversion host, has no NHWC/NCHW mix-up, and links to the [human lesson](01-the-pipeline.html).
