1#pragma once
2
3// @generated by torchgen/gen.py from Function.h
4
5#include <ATen/Context.h>
6#include <ATen/DeviceGuard.h>
7#include <ATen/TensorUtils.h>
8#include <ATen/TracerMode.h>
9#include <ATen/core/Generator.h>
10#include <ATen/core/Reduction.h>
11#include <ATen/core/Tensor.h>
12#include <c10/core/Scalar.h>
13#include <c10/core/Storage.h>
14#include <c10/core/TensorOptions.h>
15#include <c10/util/Deprecated.h>
16#include <c10/util/Optional.h>
17
18
19
20#include <ATen/ops/nll_loss_nd_ops.h>
21
22namespace at {
23
24
25// aten::nll_loss_nd(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, SymInt ignore_index=-100) -> Tensor
26inline at::Tensor nll_loss_nd(const at::Tensor & self, const at::Tensor & target, const c10::optional<at::Tensor> & weight={}, int64_t reduction=at::Reduction::Mean, int64_t ignore_index=-100) {
27 return at::_ops::nll_loss_nd::call(self, target, weight, reduction, ignore_index);
28}
29namespace symint {
30 template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
31 at::Tensor nll_loss_nd(const at::Tensor & self, const at::Tensor & target, const c10::optional<at::Tensor> & weight={}, int64_t reduction=at::Reduction::Mean, int64_t ignore_index=-100) {
32 return at::_ops::nll_loss_nd::call(self, target, weight, reduction, ignore_index);
33 }
34}
35
36// aten::nll_loss_nd(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, SymInt ignore_index=-100) -> Tensor
37inline at::Tensor nll_loss_nd_symint(const at::Tensor & self, const at::Tensor & target, const c10::optional<at::Tensor> & weight={}, int64_t reduction=at::Reduction::Mean, c10::SymInt ignore_index=-100) {
38 return at::_ops::nll_loss_nd::call(self, target, weight, reduction, ignore_index);
39}
40namespace symint {
41 template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
42 at::Tensor nll_loss_nd(const at::Tensor & self, const at::Tensor & target, const c10::optional<at::Tensor> & weight={}, int64_t reduction=at::Reduction::Mean, c10::SymInt ignore_index=-100) {
43 return at::_ops::nll_loss_nd::call(self, target, weight, reduction, ignore_index);
44 }
45}
46
47}
48