tracel-ai/burn ? reverse-engineered prompt

Reverse engineered prompt

Build me a Rust library for tensor math and deep learning that feels simple to use but is still fast and flexible.

I want it to let me create tensors, do basic math, build neural network layers, and train a small model with automatic differentiation. It should support both training and inference in the same code, with a clean API that feels friendly like PyTorch but stays idiomatic Rust. If you can, include a CPU backend first, and make the design easy to extend later for other backends.

Please also add a few runnable examples, like a tiny MLP on fake data or a simple image classifier demo, plus clear docs so someone can understand how to use it quickly. Keep the code organized, well tested, and practical enough that I could actually build on it. If you need to check current Rust docs or best practices online, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab