1#ifndef INFINI_OPS_BASE_NLL_LOSS_FORWARD_H_
2#define INFINI_OPS_BASE_NLL_LOSS_FORWARD_H_
13 const std::optional<Tensor> weight,
const int64_t reduction,
14 const int64_t ignore_index,
Tensor output,
Tensor total_weight)
32 weight_type_{weight ? weight->dtype() : DataType::kFloat32},
38 const std::optional<Tensor> weight,
39 const int64_t reduction,
const int64_t ignore_index,
Definition nll_loss_forward.h:10
DataType total_weight_type_
Definition nll_loss_forward.h:65
Tensor::Strides total_weight_strides_
Definition nll_loss_forward.h:63
Tensor::Shape target_shape_
Definition nll_loss_forward.h:49
int device_index_
Definition nll_loss_forward.h:79
DataType output_type_
Definition nll_loss_forward.h:59
Tensor::Strides target_strides_
Definition nll_loss_forward.h:51
DataType weight_type_
Definition nll_loss_forward.h:73
int64_t ignore_index_
Definition nll_loss_forward.h:77
int64_t reduction_
Definition nll_loss_forward.h:75
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
DataType input_type_
Definition nll_loss_forward.h:47
DataType target_type_
Definition nll_loss_forward.h:53
Tensor::Strides output_strides_
Definition nll_loss_forward.h:57
NllLossForward(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_loss_forward.h:12
Tensor::Strides input_strides_
Definition nll_loss_forward.h:45
Tensor::Shape input_shape_
Definition nll_loss_forward.h:43
Tensor::Shape weight_shape_
Definition nll_loss_forward.h:69
bool has_weight_
Definition nll_loss_forward.h:67
Tensor::Shape output_shape_
Definition nll_loss_forward.h:55
Tensor::Shape total_weight_shape_
Definition nll_loss_forward.h:61
Tensor::Strides weight_strides_
Definition nll_loss_forward.h:71
Definition generated/include/operator.h:282
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8