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

Class MyInnerTestModule

test/test_mobile_optimizer.py:513–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511
512 def test_clone_module_with_class(self):
513 class MyInnerTestModule(torch.nn.Module):
514 def __init__(self):
515 super().__init__()
516 self.pqr = torch.Tensor([10., 20., 30.])
517
518 def forward(self, inputs):
519 return inputs
520
521 @torch.jit.export
522 def dummy_method_not_cloned(self):
523 return 20
524
525 class MyTestModule(torch.nn.Module):
526 def __init__(self):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by 1

__init__Method · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…