MCPcopy Create free account
hub / github.com/pytorch/pytorch / method

Method method

test/test_jit.py:8835–8852  ·  view source on GitHub ↗
(self, x, x1, y, y1)

Source from the content-addressed store, hash-verified

8833
8834 @torch.jit.export
8835 def method(self, x, x1, y, y1):
8836 mod_names = ""
8837 for name, mod in self.named_modules():
8838 mod_names = mod_names + " " + name
8839 x = mod(x)
8840
8841 children_names = ""
8842 for name, mod in self.named_children():
8843 children_names = children_names + " " + name
8844 x1 = mod(x1)
8845
8846 for mod in self.modules():
8847 y = mod(y)
8848
8849 for mod in self.children():
8850 y1 = mod(y1)
8851
8852 return mod_names, children_names, x, x1, y, y1
8853
8854 def forward(self, x):
8855 return x + 2

Callers 1

Calls 6

named_modulesMethod · 0.45
named_childrenMethod · 0.45
modulesMethod · 0.45
childrenMethod · 0.45
named_buffersMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected