MCPcopy Create free account
hub / github.com/TrustAGI-Lab/MTGODE / forward

Method forward

model.py:64–86  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

62 adjoint=adjoint, perturb=perturb)
63
64 def forward(self, x):
65 x = x[..., -self.intermediate_seq_len:]
66 for tconv in self.inception_1.tconv:
67 tconv.dilation = (1, self.new_dilation)
68 for tconv in self.inception_2.tconv:
69 tconv.dilation = (1, self.new_dilation)
70
71 filter = self.inception_1(x)
72 filter = torch.tanh(filter)
73 gate = self.inception_2(x)
74 gate = torch.sigmoid(gate)
75 x = filter * gate
76
77 self.new_dilation *= self.dilation_factor
78 self.intermediate_seq_len = x.size(3)
79
80 x = F.dropout(x, self.dropout, training=self.training)
81
82 x = self.gconv_1(x, self.graph) + self.gconv_2(x, self.graph.transpose(1, 0))
83
84 x = nn.functional.pad(x, (self.receptive_field - x.size(3), 0))
85
86 return x
87
88 def setGraph(self, graph):
89 self.graph = graph

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected