MCPcopy Create free account
hub / github.com/TingsongYu/PyTorch_Tutorial / forward

Method forward

Code/2_model/2_finetune.py:77–84  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

75 self.fc3 = nn.Linear(84, 10)
76
77 def forward(self, x):
78 x = self.pool1(F.relu(self.conv1(x)))
79 x = self.pool2(F.relu(self.conv2(x)))
80 x = x.view(-1, 16 * 5 * 5)
81 x = F.relu(self.fc1(x))
82 x = F.relu(self.fc2(x))
83 x = self.fc3(x)
84 return x
85
86 # 定义权值初始化
87 def initialize_weights(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected