MCPcopy Create free account
hub / github.com/cure-lab/deep-active-learning / forward

Method forward

models/linear.py:28–32  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

26 self.lm1 = nn.Linear(self.dim, embSize)
27 self.lm2 = nn.Linear(embSize, n_class)
28 def forward(self, x):
29 x = x.view(-1, self.dim)
30 emb = F.relu(self.lm1(x))
31 out = self.lm2(emb)
32 return out, emb
33 def get_embedding_dim(self):
34 return self.embSize
35

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected