2012-10-30 03:52:39 +00:00
|
|
|
#ifndef cmRbm_h
|
|
|
|
#define cmRbm_h
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-11-16 19:59:27 +00:00
|
|
|
//( { file_desc:"Restricted Bolzmann Machine object." kw:[model] }
|
2012-10-30 03:52:39 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
kOkRbmRC = cmOkRC,
|
|
|
|
kInvalidParmRbmRC,
|
|
|
|
kStackFailRbmRC,
|
|
|
|
kMonitorWrFailRbmRC
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef cmHandle_t cmRbmH_t;
|
|
|
|
typedef cmRC_t cmRbmRC_t;
|
|
|
|
|
|
|
|
extern cmRbmH_t cmRbmNullHandle;
|
|
|
|
|
|
|
|
cmRbmRC_t cmRbmAllocate( cmCtx_t* ctx, cmRbmH_t* hp, const unsigned nodesPerLayer[], unsigned layerCnt );
|
|
|
|
cmRbmRC_t cmRbmFree( cmRbmH_t* hp );
|
|
|
|
bool cmRbmIsValid( cmRbmH_t h );
|
|
|
|
|
|
|
|
cmRbmRC_t cmRbmConfigure( cmRbmH_t h, const unsigned nodesPerLayerV[], unsigned layerCnt );
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
double maxX;
|
|
|
|
double minX;
|
|
|
|
double initW;
|
|
|
|
double eta; // learning rate
|
|
|
|
double holdOutFrac;
|
|
|
|
unsigned epochCnt;
|
|
|
|
unsigned batchCnt;
|
|
|
|
double momentum;
|
|
|
|
} cmRbmTrainParms_t;
|
|
|
|
|
|
|
|
void cmRbmBinaryTest(cmCtx_t* ctx);
|
|
|
|
|
2015-11-16 19:59:27 +00:00
|
|
|
//)
|
|
|
|
|
2012-10-30 03:52:39 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|