pytorch/test
PyExtreme e1d13f4f8b C++ API parity: NLLLoss & CrossEntropyLoss (#29812)
Summary:
Hi yf225 , I have added **NLLLoss and CrossEntropyLoss.**
```

Also, while using log_softmax in cross_entropy_loss, I am getting an error
../caffe2/../torch/csrc/api/include/torch/nn/functional/loss.h:537:63: error: no matching function for call to  log_softmax(const at::Tensor&)’
     const Tensor& log_softmax_input = torch::log_softmax(input);

aten/src/ATen/Functions.h:5551:22: note: candidate: at::Tensor at::log_softmax(const at::Tensor&, int64_t, c10::optional<c10::ScalarType>)
 static inline Tensor log_softmax(const Tensor & self, int64_t dim, c10::optional<ScalarType> dtype) {
                      ^~~~~~~~~~~
aten/src/ATen/Functions.h:5551:22: note:   candidate expects 3 arguments, 1 provided
```

I think the other two parameters should be optional as in python frontend(shown in documentation here at https://pytorch.org/docs/stable/nn.functional.html#torch.nn.functional.log_softmax ). Rest, there were no errors in build and tests have passed
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29812

Differential Revision: D18548249

Pulled By: yf225

fbshipit-source-id: 2ab350abd2a6f498d4dba2345f51ad87471f3038
2019-11-16 10:49:09 -08:00
..
backward_compatibility Back out "Revert D18299298: [pytorch][PR] Migrate conv3d from TH to ATen (CPU)" (#29286) 2019-11-11 17:33:14 -08:00
bottleneck
cpp C++ API parity: NLLLoss & CrossEntropyLoss (#29812) 2019-11-16 10:49:09 -08:00
cpp_api_parity C++ API parity: NLLLoss & CrossEntropyLoss (#29812) 2019-11-16 10:49:09 -08:00
cpp_extensions More checks on MSVC (#29709) 2019-11-13 00:15:40 -08:00
custom_operator Implement more of of the nn.Module API (#28828) 2019-11-06 22:58:25 -08:00
data
error_messages
expect Revert "Revert D18171156: Merge Tensor and Variable." (#29299) 2019-11-08 09:11:20 -08:00
jit split module interface tests (#29917) 2019-11-15 19:09:36 -08:00
mobile/op_deps add test/mobile/op_deps project for dependency analysis test (#29716) 2019-11-14 20:41:38 -08:00
onnx Add ONNX support for Logdet (#29767) 2019-11-15 20:27:43 -08:00
optim
scripts Add scripts to run cuda-memcheck (#28127) 2019-10-29 12:05:29 -07:00
test_module
common_cuda.py
common_device_type.py
common_distributed.py
common_methods_invocations.py
common_nn.py Disables TestNN.test_CTCLoss_1d_target (#29841) 2019-11-15 22:03:04 -08:00
common_quantization.py Add e2e test for conv+bn (#27348) 2019-11-01 11:28:47 -07:00
common_quantized.py
common_utils.py switching to a simple/full executor 2019-11-11 13:41:35 -08:00
dist_autograd_test.py Always include autograd context id in rpc/remote requests (#29781) 2019-11-14 23:02:11 -08:00
dist_optimizer_test.py Simple distributed optimizer (#29304) 2019-11-11 12:02:24 -08:00
dist_utils.py Properly shutdown RPC even in the case of clean_shutdown=False. (#29148) 2019-11-11 11:30:48 -08:00
expecttest.py
HowToWriteTestsUsingFileCheck.md
hypothesis_utils.py Refactor qconv_prepack and qconv_unpack to support conv3d (#28481) 2019-10-27 14:43:16 -07:00
jit_utils.py Simplify ScriptModule bindings. (#29432) 2019-11-11 13:52:36 -08:00
rpc_test.py Allow rpc.remote to create RRef on self (#29634) 2019-11-14 00:10:24 -08:00
run_test.py Revert "Enable test_distributed for ROCm but only with nccl backend" (#29736) 2019-11-13 13:53:05 -08:00
simulate_nccl_errors.py
test_autograd.py Simplify c10 dispatcher (#28314) 2019-11-14 21:35:44 -08:00
test_c10d.py Moving python allgather_coalesced impl from Py to C. (#29059) 2019-11-04 08:34:34 -08:00
test_c10d_spawn.py
test_cpp_api_parity.py
test_cpp_extensions.py add pybind version of HANDLE_TH_ERRORS 2019-11-07 08:35:11 -08:00
test_cuda.py Use handle pool to manage cuparse handles (#29426) 2019-11-09 23:12:34 -08:00
test_cuda_primary_ctx.py
test_data_parallel.py Split out data_parallel tests from test_nn.py into a separate (#28297) 2019-10-18 17:48:40 -07:00
test_dataloader.py
test_dist_autograd_fork.py
test_dist_autograd_spawn.py
test_dist_optimizer_fork.py Simple distributed optimizer (#29304) 2019-11-11 12:02:24 -08:00
test_dist_optimizer_spawn.py Simple distributed optimizer (#29304) 2019-11-11 12:02:24 -08:00
test_distributed.py Revert "Enable test_distributed for ROCm but only with nccl backend" (#29736) 2019-11-13 13:53:05 -08:00
test_distributions.py Revert D18249048: Moved VonMises distribution with sampling upstream from Pyro. 2019-11-04 09:50:50 -08:00
test_docs_coverage.py
test_expecttest.py
test_fake_quant.py Add the unittest import for test_fake_quant.py (#28815) 2019-10-28 17:52:57 -07:00
test_function_schema.py
test_indexing.py Buffer python warning to avoid deadlocks 2019-11-07 08:35:06 -08:00
test_jit.py Check for mutable default parameters (#29833) 2019-11-14 18:28:48 -08:00
test_jit_disabled.py
test_jit_fuser.py switching to a simple/full executor 2019-11-11 13:41:35 -08:00
test_jit_fuser_legacy.py switching to a simple/full executor 2019-11-11 13:41:35 -08:00
test_jit_legacy.py switching to a simple/full executor 2019-11-11 13:41:35 -08:00
test_jit_py3.py split module interface tests (#29917) 2019-11-15 19:09:36 -08:00
test_jit_simple.py switching to a simple/full executor 2019-11-11 13:41:35 -08:00
test_jit_string.py
test_logging.py
test_mkldnn.py
test_multiprocessing.py
test_multiprocessing_spawn.py
test_namedtensor.py named tensor support for torch.equal (#29322) 2019-11-13 12:45:06 -08:00
test_namedtuple_return_api.py Migrate return type void to () for native functions. (#28290) 2019-10-22 15:23:20 -07:00
test_nccl.py
test_nn.py AdaptiveAvgPooling nhwc cuda update (#29700) 2019-11-14 11:02:48 -08:00
test_numba_integration.py
test_optim.py Add multiplicative lr. (#27254) 2019-10-23 11:38:45 -07:00
test_qat.py
test_quantization.py PackedSequence support for quantized LSTM 2019-11-12 20:13:38 -08:00
test_quantized.py Convert conv_prepack to conv2d_prepack and conv_unpack to conv2d_unpack (#29529) 2019-11-11 21:54:10 -08:00
test_quantized_models.py
test_quantized_nn_mods.py Add nn.quantized.Conv3d (#29813) 2019-11-15 04:33:40 -08:00
test_quantized_tensor.py Skip copy_same_type_transpose_ for quantized tensor (#29609) 2019-11-12 13:16:38 -08:00
test_rpc_fork.py
test_rpc_spawn.py
test_sparse.py
test_tensorboard.py
test_throughput_benchmark.py
test_torch.py Turn off scalar_check for diag. 2019-11-15 17:17:13 -08:00
test_type_hints.py
test_type_info.py
test_type_promotion.py Makes test_type_promotion generic (#29417) 2019-11-15 09:54:07 -08:00
test_utils.py Opset 11 updates (#28225) 2019-11-04 12:16:12 -08:00