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

Method __init__

test/models/export_program.py:229–231  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

227# Mimicking LLM with forward taking tokens and input_pos
228class ModuleKVCacheInputPos(torch.nn.Module):
229 def __init__(self):
230 super().__init__()
231 self.linear = torch.nn.Linear(3, 3)
232
233 def forward(self, x, input_pos):
234 return (self.linear(x.to(torch.float)).to(torch.long) + input_pos).to(

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected