Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Consider multiple inputs into model #468

Closed
MannyKayy opened this issue Oct 26, 2017 · 1 comment · Fixed by #523
Closed

Consider multiple inputs into model #468

MannyKayy opened this issue Oct 26, 2017 · 1 comment · Fixed by #523
Assignees

Comments

@MannyKayy
Copy link
Contributor

Currently, the additional tools in chainercv expect that a model takes only one input (an image).
So tools such as apply_prediction_to_iterator.py are only designed to handle single input models. In some cases, a vision model will take multiple inputs (e.g. VQA or Bi-Linear models) and it would be nice to natively support that.

@Hakuyume
Copy link
Member

Hakuyume commented Nov 12, 2017

How about adding a new option, n_arg? It indicates the number of additional arguments to passed to predict.

apply_prediction_to_iterator(predict, iterator)  # predict(imgs) is called for each batch
apply_prediction_to_iterator(predict, iterator, n_arg=2)  # predict(imgs, gt0, gt1) is called for each batch

In both cases, it returns imgs, pred_values, gt_values.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants