1#ifndef INFINI_OPS_BASE_NLL_LOSS2D_FORWARD_H_
2#define INFINI_OPS_BASE_NLL_LOSS2D_FORWARD_H_
13 const std::optional<Tensor> weight,
const int64_t reduction,
14 const int64_t ignore_index,
Tensor output,
33 weight_type_{weight ? weight->dtype() : DataType::kFloat32},
39 const std::optional<Tensor> weight,
40 const int64_t reduction,
const int64_t ignore_index,
Definition nll_loss2d_forward.h:10
Tensor::Shape target_shape_
Definition nll_loss2d_forward.h:50
int64_t ignore_index_
Definition nll_loss2d_forward.h:78
Tensor::Strides input_strides_
Definition nll_loss2d_forward.h:46
int64_t reduction_
Definition nll_loss2d_forward.h:76
DataType total_weight_type_
Definition nll_loss2d_forward.h:66
Tensor::Strides target_strides_
Definition nll_loss2d_forward.h:52
Tensor::Shape input_shape_
Definition nll_loss2d_forward.h:44
Tensor::Strides weight_strides_
Definition nll_loss2d_forward.h:72
NllLoss2dForward(const Tensor input, const Tensor target, const std::optional< Tensor > weight, const int64_t reduction, const int64_t ignore_index, Tensor output, Tensor total_weight)
Definition nll_loss2d_forward.h:12
int device_index_
Definition nll_loss2d_forward.h:80
DataType target_type_
Definition nll_loss2d_forward.h:54
bool has_weight_
Definition nll_loss2d_forward.h:68
Tensor::Strides total_weight_strides_
Definition nll_loss2d_forward.h:64
DataType input_type_
Definition nll_loss2d_forward.h:48
Tensor::Strides output_strides_
Definition nll_loss2d_forward.h:58
DataType weight_type_
Definition nll_loss2d_forward.h:74
virtual void operator()(const Tensor input, const Tensor target, const std::optional< Tensor > weight, const int64_t reduction, const int64_t ignore_index, Tensor output, Tensor total_weight) const =0
Tensor::Shape output_shape_
Definition nll_loss2d_forward.h:56
Tensor::Shape total_weight_shape_
Definition nll_loss2d_forward.h:62
Tensor::Shape weight_shape_
Definition nll_loss2d_forward.h:70
DataType output_type_
Definition nll_loss2d_forward.h:60
Definition generated/include/operator.h:282
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8