Код: Выделить всё
z = torch.tensor(1, dtype= torch.int64)
z[:] = 5
Traceback (most recent call last):
File "", line 1, in
IndexError: slice() cannot be applied to a 0-dim tensor.
Подробнее здесь: https://stackoverflow.com/questions/787 ... rch-tensor