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.

67 lines
1.6 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __CORTEX_PARSER_HEADER__
  2. #define __CORTEX_PARSER_HEADER__
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <stdlib.h>
  6. /*#include "activation_layer.h"
  7. #include "activations.h"
  8. #include "assert.h"
  9. #include "avgpool_layer.h"
  10. #include "batchnorm_layer.h"
  11. #include "blas.h"
  12. #include "connected_layer.h"
  13. #include "convolutional_layer.h"
  14. #include "cost_layer.h"
  15. #include "crnn_layer.h"
  16. #include "crop_layer.h"
  17. #include "detection_layer.h"
  18. #include "dropout_layer.h"
  19. #include "gru_layer.h"
  20. #include "list.h"
  21. #include "local_layer.h"
  22. #include "maxpool_layer.h"
  23. #include "normalization_layer.h"
  24. #include "option_list.h"
  25. #include "parser.h"
  26. #include "region_layer.h"
  27. #include "reorg_layer.h"
  28. #include "rnn_layer.h"
  29. #include "route_layer.h"
  30. #include "shortcut_layer.h"
  31. #include "softmax_layer.h"
  32. #include "utils.h"
  33. */
  34. #include <stdint.h>
  35. #include "basicCortex.h"
  36. #include "basicList.h"
  37. typedef struct S_Section{
  38. char * type;
  39. cortexList * options;
  40. } section;
  41. typedef struct S_sizeParams{
  42. int batch;
  43. int inputs;
  44. int h;
  45. int w;
  46. int c;
  47. int index;
  48. int time_steps;
  49. basicCortex *net;
  50. } sizeParams;
  51. cortexList * readCfg( char * filename );
  52. basicCortex * parseNetCfg( char * filename);
  53. basicCortex * parseNetCfgCustom( char * filename, int batch);
  54. void saveNet( basicCortex * net, char *filename);
  55. void saveWeights( basicCortex * net, char *filename);
  56. void saveWeightsUpto( basicCortex * net, char *filename, int cutoff);
  57. void saveWeightsDouble( basicCortex * net, char *filename);
  58. void loadWeights( basicCortex * net, char *filename);
  59. void loadWeightsUpto( basicCortex * net, char *filename, int cutoff);
  60. #endif