[Torch] Support Python list, more realistic recurrent networks (#5306)
authormasahi <masahi129@gmail.com>
Mon, 13 Apr 2020 06:11:57 +0000 (15:11 +0900)
committerGitHub <noreply@github.com>
Mon, 13 Apr 2020 06:11:57 +0000 (23:11 -0700)
commit0145cd504585e25b776bef83688d10ff0ca44082
tree29290c4406e4d6d2abb39ae5853bca69ed19368e
parentcd0d52daa6942bdafa9363ff6cfa3d25fcd5b8d6
[Torch] Support Python list, more realistic recurrent networks (#5306)

* use funcs from prelude, pass around convert_map

* get relay input type from user ishape

* handle tuple unpack

* experimenting with static tensor array

* use prelude concat instead of cons + rev

* minor clean up

* fix layer norm conversion bug, unwrap tensor array

* add infer shape on tensor array

* pass around prelude for now

* compile worked but runtime error

* fix tensor array wrapping

* begin list dynamic test

* is_list_dynamic first version

* finish dynamic list test

* a few fix

* use shape_of function if Any is found

* improve size conversion

* working on adding free vars to loop block

* fixed inlined inner loop issue

* clean up free var handling

* add support for tensor array concat

* adding ta concat on last axis

* fix concat, but got runtime error

* disable concat on axis -1 for now

* add lstm tests

* revert unrelated change

* fix stacked bidir test

* minor fix to test

* relax tol a bit, revert dnnl change to avoid conflict

* simplify infer type, use input tensor shape rather than concat shape

* more shape fix
python/tvm/relay/frontend/pytorch.py
tests/python/frontend/pytorch/lstm_test.py [new file with mode: 0644]
tests/python/frontend/pytorch/test_forward.py