MCPcopy Create free account
hub / github.com/pytorch/executorch / __init__

Method __init__

extension/pybindings/test/make_test.py:121–123  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

119 """The module to serialize and execute."""
120
121 def __init__(self):
122 super(ModuleAddWithAttributes, self).__init__()
123 self.register_buffer("state", torch.zeros(2, 2))
124
125 def forward(self, x, y):
126 self.state.add_(1)

Callers

nothing calls this directly

Calls 3

register_bufferMethod · 0.80
zerosMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected