Skip to content

Commit 964f57b

Browse files
beat-buesserprachi0606
authored andcommitted
Mypy updates for torch 2.8.0
Signed-off-by: Beat Buesser <[email protected]> Signed-off-by: Prachi Panwar <[email protected]>
1 parent c110a43 commit 964f57b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

art/estimators/certification/deep_z/pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def concrete_forward(self, in_x: np.ndarray | "torch.Tensor") -> "torch.Tensor":
169169
# as reshapes are not modules we infer when the reshape from convolutional to dense occurs
170170
if self.reshape_op_num == op_num:
171171
x = x.reshape((x.shape[0], -1))
172-
x = op.concrete_forward(x)
172+
x = op.concrete_forward(x) # type: ignore
173173
return x
174174

175175
def set_forward_mode(self, mode: str) -> None:

art/estimators/certification/interval/pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def concrete_forward(self, in_x: np.ndarray | "torch.Tensor") -> "torch.Tensor":
179179
if isinstance(op, PyTorchIntervalConv2D) and self.forward_mode == "attack":
180180
x = op.conv_forward(x)
181181
else:
182-
x = op.concrete_forward(x)
182+
x = op.concrete_forward(x) # type: ignore
183183
return x
184184

185185
def set_forward_mode(self, mode: str) -> None:

0 commit comments

Comments
 (0)