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

Method forward

models/resnet.py:162–171  ·  view source on GitHub ↗
(self, x, intermediate=False)

Source from the content-addressed store, hash-verified

160
161
162 def forward(self, x, intermediate=False):
163 out, in_values = self.feature_extractor(x, x.shape[2])
164 # apply dropout to approximate the bayesian networks
165 out = F.dropout(out, p=0.2, training=self.bayesian)
166 # emb = emb.view(emb.size(0), -1)
167 out, emb = self.linear(out)
168 if intermediate == True:
169 return out, emb, in_values
170 else:
171 return out, emb
172
173 def get_embedding_dim(self):
174 return self.embDim

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected