Allow passing dicts as trace inputs. (#18092)
authorEric Faust <efaust@fb.com>
Fri, 19 Apr 2019 06:48:59 +0000 (23:48 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 19 Apr 2019 06:52:00 +0000 (23:52 -0700)
commit593bb145ceea548478f83fd820de44b95d375108
tree5c88434f16733225cb3fcb3e873a55dd42a06472
parent9034b66f14096d39eb1a2bb8e273f4b78f93e58d
Allow passing dicts as trace inputs. (#18092)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18092

Previously, tracing required all inputs to be either tensors,
or tuples of tensor. Now, we allow users to pass dicts as well.

Differential Revision: D14491795

fbshipit-source-id: 7a2df218e5d00f898d01fa5b9669f9d674280be3
12 files changed:
aten/src/ATen/core/type.cpp
test/cpp/jit/test_autodiff.h
test/test_jit.py
torch/autograd/function.py
torch/csrc/jit/pybind_utils.h
torch/csrc/jit/python_tracer.cpp
torch/csrc/jit/python_tracer.h
torch/csrc/jit/register_prim_ops.cpp
torch/csrc/jit/script/init.cpp
torch/csrc/jit/tracer.cpp
torch/csrc/jit/tracer.h
torch/jit/__init__.py