Well, in short - basic linear algebra, basic probability, analysis (functions like exp), gradient.
At some point I tried to create an introduction step-by-step, where people can interact with these concepts and see how to express it in PyTorch:
https://github.com/stared/thinking-in-tensors-writing-in-pyt...