MCPcopy Create free account
hub / github.com/DeepGraphLearning/S3F / forward

Method forward

s3f/gvp_layer.py:190–199  ·  view source on GitHub ↗

:param x: tuple (s, V) of `torch.Tensor`, or single `torch.Tensor` (will be assumed to be scalar channels)

(self, x)

Source from the content-addressed store, hash-verified

188 self.vdropout = _VDropout(drop_rate)
189
190 def forward(self, x):
191 '''
192 :param x: tuple (s, V) of `torch.Tensor`,
193 or single `torch.Tensor`
194 (will be assumed to be scalar channels)
195 '''
196 if type(x) is torch.Tensor:
197 return self.sdropout(x)
198 s, v = x
199 return self.sdropout(s), self.vdropout(v)
200
201
202class GVPLayerNorm(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected