Program Listing for File binary_cross_entropy.h
↰ Return to documentation for file (include/converter/include/ops/binary_cross_entropy.h
)
#ifndef MINDSPORE_CORE_OPS_BINARY_CROSS_ENTROPY_H_
#define MINDSPORE_CORE_OPS_BINARY_CROSS_ENTROPY_H_
#include <memory>
#include <string>
#include <vector>
#include "mindapi/base/types.h"
#include "ops/base_operator.h"
namespace mindspore {
namespace ops {
constexpr auto kNameBinaryCrossEntropy = "BinaryCrossEntropy";
class MIND_API BinaryCrossEntropy : public BaseOperator {
public:
MIND_API_BASE_MEMBER(BinaryCrossEntropy);
BinaryCrossEntropy() : BaseOperator(kNameBinaryCrossEntropy) { InitIOName({"x", "y", "weight"}, {"output"}); }
void Init(const Reduction &reduction = MEAN);
void set_reduction(const Reduction &reduction);
Reduction get_reduction() const;
};
} // namespace ops
} // namespace mindspore
#endif // MINDSPORE_CORE_OPS_BINARY_CROSS_ENTROPY_H_