3#if _MSC_VER >= 1900 && defined(_M_X64)
5#include "ComputationalGraph.h"
12 class FL_EXPORT CComputationalGraphThreshold :
public CComputationalGraph<T>
15 CComputationalGraphThreshold();
18 CComputationalGraphThreshold(
const CComputationalGraphThreshold<T>& cg);
21 CComputationalGraphThreshold(
const CComputationalBase<T>& cbOperand,
double tThreshold,
double tValue, Base::ELogicalCondition eLogicalCondition,
bool bInplace =
false);
22 virtual ~CComputationalGraphThreshold();
24 virtual CTensor<T>& Forward()
override;
25 virtual CTensor<T>* Backward()
override;
26 virtual CComputationalBase<T>* Clone()
const override;
27 virtual const CResult PrintNodeParamInfo()
const override;
29 virtual const CResult GetBinaryData(Base::CFLData& fldBinary,
bool bSuperClass =
false, int32_t i32Version = -1,
bool bDumpMode =
false)
const override;
30 virtual const CResult GetBinaryData(Base::CFLData* pFldBinary,
bool bSuperClass =
false, int32_t i32Version = -1,
bool bDumpMode =
false)
const override;
32 virtual const CResult SetBinaryData(
const Base::CFLData& fldBinary, int64_t* pI64Offset =
nullptr)
override;
33 virtual const CResult SetBinaryData(
const Base::CFLData* pFldBinary, int64_t* pI64Offset =
nullptr)
override;
35 virtual const std::vector<int64_t>& GetEstimatedShape(
bool bRecursive =
true)
const override;
38 DeclareGetClassType();
39 SupportToDuplicateObjectWithoutCreateNewObject(CComputationalGraphThreshold, *
this);
44 Base::ELogicalCondition m_eLogicalCondition;
47 DeclareGetSignletonObject(CComputationalGraphThreshold);
50 #define CCGFThreshold(...) (*(new CComputationalGraphThreshold<float>(__VA_ARGS__)))
51 #define CCGDThreshold(...) (*(new CComputationalGraphThreshold<double>(__VA_ARGS__)))
53 #define CCGTThreshold(T, ...) (*(new CComputationalGraphThreshold<T>(__VA_ARGS__)))