MCPcopy Create free account
hub / github.com/ai4ce/RAP / forward

Method forward

models/gs/basic_mlp.py:45–55  ·  view source on GitHub ↗
(self, inx)

Source from the content-addressed store, hash-verified

43 setattr(self, f"lin{l}", lin)
44
45 def forward(self, inx):
46 x = inx
47 for l in range(self.num_layers - 1):
48 lin = getattr(self, f"lin{l}")
49 x = lin(x)
50 if l == self.num_layers - 2:
51 if self.last_act_fun is not None:
52 x = self.last_act_fun(x)
53 else:
54 x = self.act_fun(x)
55 return x

Callers 1

renderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected