PyTorch 实现与追问

题集来源:Alireza Dirafzoon(alirezadir)收录项目:AIMLInterviews查看原题集

题目来源
Devinterview 其中第 85—146 题的题目索引来自 Devinterview,答案由 AIMLInterviews 重新撰写;原文的 50 题补充部分在此收录为 62 道,含拆分追问。

题目目录

156 道原题
  1. What is wrong with mutable default arguments?

    原题
  2. Explain shallow versus deep copies with an ML configuration.

    原题
  3. Design errors for an invalid preprocessing shape or dtype.

    原题
  4. Accept either NumPy arrays or PyTorch tensors without unclear behavior.

    原题
  5. Compute the masked mean of [B, T, D] using a [B, T] mask.

    原题
  6. Compute pairwise cosine similarity for [N, D] and [M, D].

    原题
  7. Determine whether the true label is in the top-k predictions.

    原题
  8. Implement one-hot encoding without F.one_hot.

    原题
  9. Create label-smoothed targets.

    原题
  10. Compute a batched confusion matrix without per-example loops.

    原题