lf1-io / padl

Functional deep learning
Apache License 2.0
106 stars 4 forks source link

Make `infer_apply` unpack arguments. #382

Open wuhu opened 2 years ago

wuhu commented 2 years ago

Currently, infer_apply expects a single input. In case of Transforms expecting multiple args, this must be a tuple. Would be nice to have it accept multiple args in accordance to what it's __call__ expects.

Is there anything against this?

sjrl commented 2 years ago

I don't think so, but it would slightly change how infer_apply and eval/train_apply work, right? I believe eval_apply would expect a list of tuples in the case you have outlined. And then I think changing infer_apply as you suggest would mean it would no longer work with a tuple, which could potentially be confusing. What do you think?