libcm is a C development framework with an emphasis on audio signal processing applications.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //| Copyright: (C) 2009-2020 Kevin Larke <contact AT larke DOT org>
  2. //| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
  3. #ifndef cmRbm_h
  4. #define cmRbm_h
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. //( { file_desc:"Restricted Bolzmann Machine object." kw:[model] }
  9. enum
  10. {
  11. kOkRbmRC = cmOkRC,
  12. kInvalidParmRbmRC,
  13. kStackFailRbmRC,
  14. kMonitorWrFailRbmRC
  15. };
  16. typedef cmHandle_t cmRbmH_t;
  17. typedef cmRC_t cmRbmRC_t;
  18. extern cmRbmH_t cmRbmNullHandle;
  19. cmRbmRC_t cmRbmAllocate( cmCtx_t* ctx, cmRbmH_t* hp, const unsigned nodesPerLayer[], unsigned layerCnt );
  20. cmRbmRC_t cmRbmFree( cmRbmH_t* hp );
  21. bool cmRbmIsValid( cmRbmH_t h );
  22. cmRbmRC_t cmRbmConfigure( cmRbmH_t h, const unsigned nodesPerLayerV[], unsigned layerCnt );
  23. typedef struct
  24. {
  25. double maxX;
  26. double minX;
  27. double initW;
  28. double eta; // learning rate
  29. double holdOutFrac;
  30. unsigned epochCnt;
  31. unsigned batchCnt;
  32. double momentum;
  33. } cmRbmTrainParms_t;
  34. void cmRbmBinaryTest(cmCtx_t* ctx);
  35. //)
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif