← Questions

Read and refactor a large PyTorch training file

0
OpenAICodingLast asked Mar 2026

You get a few hundred lines of existing PyTorch code that trains a classifier. Answer questions about its time and memory cost, then make a series of changes to it in parts, keeping it working after each one. Reading unfamiliar code quickly matters more than writing new code.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding