Skip to content

Commit 103a6ba

Browse files
committed
Mypy updates for torch 2.8.0
Signed-off-by: Beat Buesser <[email protected]>
1 parent c79b46e commit 103a6ba

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)