pytorch/test
Will Feng 6ebfbdf4c6 Add named submodule support to nn::Sequential (#17552)
Summary:
Previously, we were not able to assign names to `nn::Sequential`'s submodules. This PR adds this feature to match the Python API. Example use:
```cpp
Sequential sequential(named_submodule({
      {"linear", Linear(10, 3)},
      {"conv2d", Conv2d(1, 2, 3)},
      {"dropout", Dropout(0.5)},
      {"batchnorm", BatchNorm(5)},
      {"embedding", Embedding(4, 10)},
      {"lstm", LSTM(4, 5)}
}));
```

It also enables loading parameters of Python `nn.Sequential` module with custom submodules names into C++ frontend, unblocking https://github.com/pytorch/vision/pull/728#issuecomment-466661344.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17552

Differential Revision: D14246834

Pulled By: yf225

fbshipit-source-id: 3030b5c5d68f6dd5d3e37ac4b4f98dc6d6d9ba72
2019-03-29 13:06:29 -07:00
..
bottleneck
cpp Add named submodule support to nn::Sequential (#17552) 2019-03-29 13:06:29 -07:00
cpp_extensions Unify cudaGetDeviceCount implementations. (#18445) 2019-03-26 09:50:14 -07:00
custom_operator Add module attributes (#17309) 2019-03-07 10:44:10 -08:00
data Implement kthvalue in ATen (#17544) 2019-03-01 19:00:10 -08:00
error_messages
expect Remove remaining test jit expects redux (#17924) 2019-03-12 11:33:34 -07:00
ffi/src
onnx Minor fix for onnx ConstantOfShape export (#18199) 2019-03-26 13:23:16 -07:00
optim
test_module
common_cuda.py
common_methods_invocations.py Fix B903 lint: save memory for data classes with slots/namedtuple (#18184) 2019-03-21 09:10:30 -07:00
common_nn.py enable more unit tests (#18537) 2019-03-27 14:27:23 -07:00
common_utils.py fix #16448 (#18479) 2019-03-26 20:58:25 -07:00
expecttest.py
run_test.py Fix lint in run_test.py 2019-03-08 14:41:36 -08:00
test_autograd.py Rename trtrs to triangular_solve (#18213) 2019-03-21 14:27:21 -07:00
test_c10d.py Correctly call superclass setUp in TestCase subclasses. (#18291) 2019-03-22 07:46:44 -07:00
test_cpp_extensions.py Enable autograd to recognize the XLA backend as one providing multiple devices (#17847) 2019-03-20 13:58:36 -07:00
test_cuda.py Rename btriunpack to lu_unpack (#18529) 2019-03-29 13:01:30 -07:00
test_cuda_primary_ctx.py Lazily load libcuda libnvrtc from c++ (#17317) 2019-02-22 13:51:45 -08:00
test_dataloader.py Enable printing to stderr for test_proper_exit for better debugging (#18458) 2019-03-25 19:20:21 -07:00
test_distributed.py Correctly call superclass setUp in TestCase subclasses. (#18291) 2019-03-22 07:46:44 -07:00
test_distributions.py Correctly call superclass setUp in TestCase subclasses. (#18291) 2019-03-22 07:46:44 -07:00
test_docs_coverage.py Delete batch tensor (#18575) 2019-03-28 23:13:27 -07:00
test_expecttest.py
test_indexing.py Use IndexError instead of RuntimeError in ATen CPU kernels 2019-02-13 10:19:28 -08:00
test_indexing_cuda.py
test_jit.py fix lint (#18623) 2019-03-29 11:50:12 -07:00
test_multiprocessing.py Implement reference counting for shared IPC CUDA tensors (#16854) 2019-03-25 10:24:38 -07:00
test_multiprocessing_spawn.py
test_namedtuple_return_api.py Namedtuple return for solve, slogdet, sort, topk (#17093) 2019-03-26 12:39:08 -07:00
test_nccl.py
test_nn.py enable more unit tests (#18537) 2019-03-27 14:27:23 -07:00
test_numba_integration.py Fix Windows test CI 2019-03-13 09:22:46 -07:00
test_optim.py Adds Cyclical Learning Rate and Momentum (#18001) 2019-03-27 19:56:04 -07:00
test_quantized.py End to end hack to call server side Caffe2 ops (#18267) 2019-03-22 11:17:45 -07:00
test_sparse.py Fix incorrect sparse add behavior when the sparse tensor has non-contiguous values (#18179) 2019-03-22 19:35:14 -07:00
test_thd_distributed.py Correctly call superclass setUp in TestCase subclasses. (#18291) 2019-03-22 07:46:44 -07:00
test_torch.py Rename btriunpack to lu_unpack (#18529) 2019-03-29 13:01:30 -07:00
test_type_hints.py create type hint stub files for module torch (#12500) 2019-01-29 12:14:17 -08:00
test_type_info.py Allow converting char tensor to numpy; add [fi]info.min (#15046) 2018-12-24 09:11:24 -08:00
test_utils.py Allow None for checkpoint (#17969) 2019-03-15 07:38:41 -07:00