mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
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
|
||
|---|---|---|
| .. | ||
| backward_compatibility | ||
| bottleneck | ||
| cpp | ||
| cpp_api_parity | ||
| cpp_extensions | ||
| custom_operator | ||
| data | ||
| error_messages | ||
| expect | ||
| jit | ||
| mobile/op_deps | ||
| onnx | ||
| optim | ||
| scripts | ||
| test_module | ||
| common_cuda.py | ||
| common_device_type.py | ||
| common_distributed.py | ||
| common_methods_invocations.py | ||
| common_nn.py | ||
| common_quantization.py | ||
| common_quantized.py | ||
| common_utils.py | ||
| dist_autograd_test.py | ||
| dist_optimizer_test.py | ||
| dist_utils.py | ||
| expecttest.py | ||
| HowToWriteTestsUsingFileCheck.md | ||
| hypothesis_utils.py | ||
| jit_utils.py | ||
| rpc_test.py | ||
| run_test.py | ||
| simulate_nccl_errors.py | ||
| test_autograd.py | ||
| test_c10d.py | ||
| test_c10d_spawn.py | ||
| test_cpp_api_parity.py | ||
| test_cpp_extensions.py | ||
| test_cuda.py | ||
| test_cuda_primary_ctx.py | ||
| test_data_parallel.py | ||
| test_dataloader.py | ||
| test_dist_autograd_fork.py | ||
| test_dist_autograd_spawn.py | ||
| test_dist_optimizer_fork.py | ||
| test_dist_optimizer_spawn.py | ||
| test_distributed.py | ||
| test_distributions.py | ||
| test_docs_coverage.py | ||
| test_expecttest.py | ||
| test_fake_quant.py | ||
| test_function_schema.py | ||
| test_indexing.py | ||
| test_jit.py | ||
| test_jit_disabled.py | ||
| test_jit_fuser.py | ||
| test_jit_fuser_legacy.py | ||
| test_jit_legacy.py | ||
| test_jit_py3.py | ||
| test_jit_simple.py | ||
| test_jit_string.py | ||
| test_logging.py | ||
| test_mkldnn.py | ||
| test_multiprocessing.py | ||
| test_multiprocessing_spawn.py | ||
| test_namedtensor.py | ||
| test_namedtuple_return_api.py | ||
| test_nccl.py | ||
| test_nn.py | ||
| test_numba_integration.py | ||
| test_optim.py | ||
| test_qat.py | ||
| test_quantization.py | ||
| test_quantized.py | ||
| test_quantized_models.py | ||
| test_quantized_nn_mods.py | ||
| test_quantized_tensor.py | ||
| test_rpc_fork.py | ||
| test_rpc_spawn.py | ||
| test_sparse.py | ||
| test_tensorboard.py | ||
| test_throughput_benchmark.py | ||
| test_torch.py | ||
| test_type_hints.py | ||
| test_type_info.py | ||
| test_type_promotion.py | ||
| test_utils.py | ||