Nice. I found a problem though:
x = torch.tensor(0)
x
Out[26]: tensor(0)
x += 3.2
x
Out[28]: tensor(3)
x = torch.tensor(0, dtype=torch.float32)
x += 3.2
x
Out[31]: tensor(3.2000)

Isn’t the default dtype supposed to be torch.float32?