10 lines
269 B
Python
10 lines
269 B
Python
import torch
|
||
|
||
|
||
class PolyModel(torch.nn.Module):
|
||
def __init__(self,input_size,output_size):
|
||
super().__init__()
|
||
self.linear = torch.nn.Linear(input_size, output_size) # 输入n维,输出m维
|
||
|
||
def forward(self, x):
|
||
return self.linear(x) |