pfnet / pytorch-pfn-extras

Supplementary components to accelerate research and development in PyTorch
https://medium.com/pytorch/migration-from-chainer-to-pytorch-8ed92c12c8
MIT License
271 stars 52 forks source link

Add export_testcase to support length 1 arrays and lists #822

Open impactaky opened 4 months ago

impactaky commented 4 months ago

Problem

The output allows a tuple or list of length 1, but not input.

Reproduction

checkout 8defb94d093be26ccec2af3d4dc41d0c4c4283d0 and run

pytest tests/pytorch_pfn_extras_tests/onnx_tests/test_export_testcase.py -k test_export_tuple_input

This PR

Add processing equivalent to output to input.