3#if _MSC_VER >= 1900 && defined(_M_X64)
5#include "BackendBase.h"
12 class FL_EXPORT CTensor;
15 class FL_EXPORT CBackendCTCLoss :
public CBackendBase<T>
19 CBackendCTCLoss(
const CBackendCTCLoss<T>& bl);
20 virtual ~CBackendCTCLoss();
22 virtual const CResult SetReductionType(EReductionType eReductionType);
23 virtual EReductionType GetReductionType()
const;
25 virtual const CResult SetBlankLabel(int64_t i64BlankLabel);
26 virtual int64_t GetBlankLabel()
const;
28 virtual const CResult EnableZeroInfinity(
bool bZeroInfinity);
29 virtual bool IsZeroInfinityEnable()
const;
31 virtual const CResult Forward(
const CTensor<T>* pTsrX,
const CTensor<T>* pTsrTarget, CTensor<T>* pTsrProbablity, CTensor<T>* pTsrBatchLoss, CTensor<T>* pTsrResult);
32 virtual const CResult Backward(
const CTensor<T>* pTsrDy,
const CTensor<T>* pTsrX,
const CTensor<T>* pTsrTarget,
const CTensor<T>* pTsrForwardProbablity,
const CTensor<T>* pTsrBatchLoss, CTensor<T>* pTsrDx,
bool bAddGradient);
34 DeclareGetClassType();
35 SupportToDuplicateObjectWithoutCreateNewObject(CBackendCTCLoss<T>, *
this);
39 inline T GetLogInnerAdd(T tValue1, T tValue2)
const;
40 inline T GetLogInnerAdd_DynamicType(T tValue1, T tValue2)
const;
42 EReductionType m_eReductionType;
43 int64_t m_i64BlankLabel;