Код: Выделить всё
class SillyModule(nn.Module):
def __init__(self, ):
super().__init__()
self.register_buffer('constant', torch.randn(1, 128))
def forward(self, x):
return torch.matmul(x, self.B)
Подробнее здесь: https://stackoverflow.com/questions/732 ... n-flax-jax
Мобильная версия