Skip to content

Commit

Permalink
fix(nn.Module): Temporarily add a try-except block in model.call to d…
Browse files Browse the repository at this point in the history
…eal with multiple arguments when run as a keras model
  • Loading branch information
hmahmood24 committed Feb 7, 2024
1 parent 74238fc commit 54e3f62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ivy/functional/frontends/torch/nn/modules/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ def forward(self, *input: Any) -> None:

def call(self, inputs, *args, training=None, mask=None, **kwargs):
if isinstance(inputs, (list, tuple)):
return self.forward(*inputs, *args, **kwargs)
try:
return self.forward(*inputs, *args, **kwargs)
except Exception:
return self.forward(inputs, *args, **kwargs)
else:
return self.forward(inputs, *args, **kwargs)

Expand Down

0 comments on commit 54e3f62

Please sign in to comment.