Skip to content

Commit 010bd7f

Browse files
authored
Update inception_v1.py
1 parent d35f047 commit 010bd7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

captum/optim/models/_image/inception_v1.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,10 @@ def forward(
266266
x = self.drop(x)
267267
x = self.fc(x)
268268
if not self.aux_logits:
269-
return cast(torch.Tensor, x)
269+
if torch.jit.is_scripting():
270+
return x
271+
else
272+
return cast(torch.Tensor, x)
270273
else:
271274
return x, aux1_output, aux2_output
272275

0 commit comments

Comments
 (0)