Program Listing for File sparse_softmax_cross_entropy_with_logits.h

Return to documentation for file (include/converter/include/ops/sparse_softmax_cross_entropy_with_logits.h)

#ifndef MINDSPORE_CORE_OPS_SPARSE_SOFTMAX_CROSS_ENTROPY_WITH_LOGITS_H_
#define MINDSPORE_CORE_OPS_SPARSE_SOFTMAX_CROSS_ENTROPY_WITH_LOGITS_H_
#include <memory>
#include <vector>

#include "mindapi/base/types.h"
#include "ops/base_operator.h"

namespace mindspore {
namespace ops {
constexpr auto kNameSparseSoftmaxCrossEntropyWithLogits = "SparseSoftmaxCrossEntropyWithLogits";
class MIND_API SparseSoftmaxCrossEntropyWithLogits : public BaseOperator {
 public:
  MIND_API_BASE_MEMBER(SparseSoftmaxCrossEntropyWithLogits);
  SparseSoftmaxCrossEntropyWithLogits() : BaseOperator(kNameSparseSoftmaxCrossEntropyWithLogits) {}
  void Init(const bool is_grad = false);
  void set_is_grad(const bool is_grad);
  bool get_is_grad() const;
};
MIND_API abstract::AbstractBasePtr SparseSoftmaxCrossEntropyWithLogitsInfer(
  const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
  const std::vector<abstract::AbstractBasePtr> &input_args);
}  // namespace ops
}  // namespace mindspore

#endif  // MINDSPORE_CORE_OPS_SPARSE_SOFTMAX_CROSS_ENTROPY_WITH_LOGITS_H_