PyTorch 实现与追问
- 题目来源
- Devinterview 其中第 85—146 题的题目索引来自 Devinterview,答案由 AIMLInterviews 重新撰写;原文的 50 题补充部分在此收录为 62 道,含拆分追问。
What are the essential steps in a PyTorch training loop?
原题What is the difference between model.eval() and torch.no_grad() or torch.inference_mode()?
原题What happens if you forget optimizer.zero_grad()?
原题How would you refactor a monolithic ML script into clean modules?
原题How would you write a utility that works on both CPU and GPU?
原题What tests would you write for a tensor preprocessing or metric utility?
原题What makes an ML utility reusable without excessive abstraction?
原题Which validation belongs at module boundaries?
原题When should a utility return tensors versus Python numbers?
原题How do you keep preprocessing consistent across training, evaluation, and inference?
原题
暂无题目