Код: Выделить всё
import torch
from torch.nn.functional import linear
a=torch.ones(2,3).type(torch.float16)
b=torch.ones(2,3).type(torch.float16)
linear(a,b)
Подробнее здесь: https://stackoverflow.com/questions/795 ... oat16-or-b
Код: Выделить всё
import torch
from torch.nn.functional import linear
a=torch.ones(2,3).type(torch.float16)
b=torch.ones(2,3).type(torch.float16)
linear(a,b)