commit | 6a91f556d0c3ba53757f27bf08df9484e0122bf4 | [log] [tgz] |
---|---|---|
author | Lu Fang <lufang@fb.com> | Thu Oct 05 14:48:15 2017 -0700 |
committer | Soumith Chintala <soumith@gmail.com> | Fri Oct 06 10:40:14 2017 -0400 |
tree | b8ef707c76ee4a12406bf093c9b854b88937b2bd | |
parent | 7dd74b6a715d2933a04240781dfe562969b9c72b [diff] |
fix a bug in exporter, we forgot to copy type to the new node for index op
diff --git a/torch/csrc/jit/export.cpp b/torch/csrc/jit/export.cpp index f336a00..7c9b8d8 100644 --- a/torch/csrc/jit/export.cpp +++ b/torch/csrc/jit/export.cpp
@@ -266,6 +266,7 @@ ->insertBefore(py_node); auto first_select = py_node->uses()[0].user; first_select->replaceAllUsesWith(squeeze); + squeeze->setType(first_select->typeOption()); for (auto use : py_node->uses()) use.user->destroy(); it.destroyCurrent();