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

Method forward

backends/mlx/test/test_ops.py:49–52  ·  view source on GitHub ↗
(self, x: torch.Tensor, y: torch.Tensor)

Source from the content-addressed store, hash-verified

47 self.alpha = alpha
48
49 def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
50 if self.alpha is not None:
51 return torch.add(x, y, alpha=self.alpha)
52 return x + y
53
54
55class AddScalarModel(nn.Module):

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected