1#ifndef INFINI_OPS_BASE_NLL_LOSS2D_H_
2#define INFINI_OPS_BASE_NLL_LOSS2D_H_
13 const std::optional<Tensor> weight,
const int64_t reduction,
14 const int64_t ignore_index,
Tensor out)
29 weight_type_{weight ? weight->dtype() : DataType::kFloat32},
35 const std::optional<Tensor> weight,
36 const int64_t reduction,
const int64_t ignore_index,
Definition nll_loss2d.h:10
DataType target_type_
Definition nll_loss2d.h:50
Tensor::Strides target_strides_
Definition nll_loss2d.h:48
int64_t ignore_index_
Definition nll_loss2d.h:68
Tensor::Strides weight_strides_
Definition nll_loss2d.h:62
Tensor::Strides out_strides_
Definition nll_loss2d.h:54
DataType weight_type_
Definition nll_loss2d.h:64
Tensor::Shape out_shape_
Definition nll_loss2d.h:52
int64_t reduction_
Definition nll_loss2d.h:66
NllLoss2d(const Tensor input, const Tensor target, const std::optional< Tensor > weight, const int64_t reduction, const int64_t ignore_index, Tensor out)
Definition nll_loss2d.h:12
DataType input_type_
Definition nll_loss2d.h:44
Tensor::Shape weight_shape_
Definition nll_loss2d.h:60
int device_index_
Definition nll_loss2d.h:70
Tensor::Shape input_shape_
Definition nll_loss2d.h:40
bool has_weight_
Definition nll_loss2d.h:58
DataType out_type_
Definition nll_loss2d.h:56
Tensor::Strides input_strides_
Definition nll_loss2d.h:42
virtual void operator()(const Tensor input, const Tensor target, const std::optional< Tensor > weight, const int64_t reduction, const int64_t ignore_index, Tensor out) const =0
Tensor::Shape target_shape_
Definition nll_loss2d.h:46
Definition generated/include/operator.h:282
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8