3#if _MSC_VER >= 1900 && defined(_M_X64)
5#include "ComputationalGraph.h"
6#include "BackendSmoothL1Loss.h"
7#include "DefinitionsAI.h"
14 class FL_EXPORT CComputationalGraphSmoothL1Loss :
public CComputationalGraph<T>
18 CComputationalGraphSmoothL1Loss();
21 CComputationalGraphSmoothL1Loss(
const CComputationalGraphSmoothL1Loss<T>& cg);
24 CComputationalGraphSmoothL1Loss(
const CComputationalBase<T>& cbOperand1,
const CComputationalBase<T>& tsrAnswer, EReductionType eReductionType = EReductionType_Mean,
const T tBeta = 1.);
25 virtual ~CComputationalGraphSmoothL1Loss();
27 virtual CTensor<T>& Forward()
override;
28 virtual CTensor<T>* Backward()
override;
29 virtual CComputationalBase<T>* Clone()
const override;
31 virtual const std::vector<int64_t>& GetEstimatedShape(
bool bRecursive =
true)
const override;
32 virtual const CResult PrintNodeParamInfo()
const override;
34 virtual const CResult GetBinaryData(Base::CFLData& fldBinary,
bool bSuperClass =
false, int32_t i32Version = -1,
bool bDumpMode =
false)
const override;
35 virtual const CResult GetBinaryData(Base::CFLData* pFldBinary,
bool bSuperClass =
false, int32_t i32Version = -1,
bool bDumpMode =
false)
const override;
37 virtual const CResult SetBinaryData(
const Base::CFLData& fldBinary, int64_t* pI64Offset =
nullptr)
override;
38 virtual const CResult SetBinaryData(
const Base::CFLData* pFldBinary, int64_t* pI64Offset =
nullptr)
override;
40 virtual int64_t GetRequiredDedicatedMemory(
bool bTraining =
false,
bool bRecursively =
true, int64_t i64BatchSize = 1)
const override;
42 DeclareGetClassType();
43 SupportToDuplicateObjectWithoutCreateNewObject(CComputationalGraphSmoothL1Loss, *
this);
45 EReductionType m_eReductionType;
48 CBackendSmoothL1Loss<T> m_backendSmoothL1Loss;
50 DeclareGetSignletonObject(CComputationalGraphSmoothL1Loss);
53 #define CCGFSmoothL1Loss(...) (*(new CComputationalGraphSmoothL1Loss<float>(__VA_ARGS__)))
54 #define CCGDSmoothL1Loss(...) (*(new CComputationalGraphSmoothL1Loss<double>(__VA_ARGS__)))
56 #define CCGTSmoothL1Loss(T, ...) (*(new CComputationalGraphSmoothL1Loss<T>(__VA_ARGS__)))