From bdc9472f318958b99a29be7cdaee2cf57f8329c4 Mon Sep 17 00:00:00 2001 From: jfrery Date: Tue, 23 Jan 2024 17:31:10 +0100 Subject: [PATCH] chore: fix pcc --- tests/torch/test_compile_torch.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/torch/test_compile_torch.py b/tests/torch/test_compile_torch.py index cea49a70e..57f3d66c8 100644 --- a/tests/torch/test_compile_torch.py +++ b/tests/torch/test_compile_torch.py @@ -1381,12 +1381,15 @@ def test_onnx_no_input(): torch_input = torch.randn(100, 28) class SimplifiedNet(nn.Module): + """Network with no input in the onnx graph.""" + def __init__(self): super().__init__() self.fc1 = nn.Linear(28, 10) self.threshold = torch.tensor(0.5, dtype=torch.float32) def forward(self, x): + """Forward pass.""" zeros = numpy.zeros_like(x) x = x + zeros x = (x > self.threshold).to(torch.float32)