Skip to content
← All tracks

Dtypes and Numerics

PyTorch

Promotion rules, integer division, accumulation error and float comparison. This track grades almost entirely on deterministic wrong answers, because that is how these failures actually arrive: not as an exception, as a number.

0 / 6 solved
  1. 1. Not solved yet. What dtype comes out
  2. 2. Not solved yet. Counting with the wrong operator
  3. 3. Not solved yet. Which half of the batch
  4. 4. Not solved yet. Where half precision stops
  5. 5. Not solved yet. Almost exactly two
  6. 6. Not solved yet. The cast that does nothing

Check yourself

4 questions · one attempt each

These do not count toward finishing the track. They are here to catch the things that are easy to read past.

0 / 4

What is the dtype of the result?

x = torch.ones(2, dtype=torch.int64)
y = x + 1.5
Question 1 of 4