Better tests/support for Python/C++ inter-op (#15193)
authorPeter Goldsborough <psag@fb.com>
Fri, 14 Dec 2018 16:29:15 +0000 (08:29 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Dec 2018 16:42:10 +0000 (08:42 -0800)
commit4327a2d70afba3cbb099ddca002fb2a2949f4579
treea4aa2b7929c30d44ab435c1af021cd9e797f17b4
parentfb8487d708311822d1a1fad3d7f6730dccab9cc0
Better tests/support for Python/C++ inter-op (#15193)

Summary:
Methods like `module.named_modules()` returns a container of `shared_ptr<nn::Module>`. Currently the `nn::Module` base class does  not have Python bindings. This PR fixes this, and adds more unit tests.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15193

Differential Revision: D13458713

Pulled By: goldsborough

fbshipit-source-id: 4091fe1b96a1be8db14c6a4307fbacc2b41ff6fe
test/cpp_extensions/cpp_frontend_extension.cpp
test/test_cpp_extensions.py
torch/csrc/api/include/torch/python.h
torch/csrc/api/src/python/init.cpp