Pytorchでニューラルネットワークを以下のように構成した時、各パラメータはどのようにすれば見れるのでしょうか?
python
1import torch 2import torch.nn as nn 3import torch.nn.functional as F 4 5 6class Net(nn.Module): 7 8 def __init__(self): 9 super(Net, self).__init__() 10 self.fc1 = nn.Linear(2, 2) 11 self.fc2 = nn.Linear(2, 2) 12 self.fc3 = nn.Linear(2, 1) 13 14 def forward(self, x): 15 x = F.relu(self.fc1(x)) 16 x = F.relu(self.fc2(x)) 17 x = self.fc3(x) 18 return x
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。