π Feature
I think in some cases we may need pass multi params to the model. For example,
if the model has two or more inputs or some states (LSTM, etc.).
It is easy to implement this feature. The source code is here:
https://github.com/pytorch/ignite/blob/34a707e53785cf8a524589f33a570a7516fe064e/ignite/engine/__init__.py#L107C26-L107C26, and we only need to replace
with
if isinstance(x, tuple):
output = model(*x)
else:
output = model(x)
. Then multi params can be pass by prepare_batch, and this change is compatible with single param.