Net.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _Net_h_
  2. #define _Net_h_
  3. /* Net.h
  4. *
  5. * Copyright (C) 2017,2018 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "Layer.h"
  21. #include "Table.h"
  22. #include "PatternList.h"
  23. #include "ActivationList.h"
  24. #include "Net_def.h"
  25. void Net_initAsDeepBeliefNet (Net me, constVEC numbersOfNodes, bool inputsAreBinary);
  26. autoNet Net_createEmpty (integer numberOfInputNodes);
  27. autoNet Net_createAsDeepBeliefNet (constVEC numbersOfNodes, bool inputsAreBinary);
  28. void Net_addRBMLayer (Net me, integer numberOfOutputNodes);
  29. void Net_addFullyConnectedLayer (Net me, integer numberOfOutputNodes);
  30. void Net_spreadUp (Net me, kLayer_activationType activationType);
  31. void Net_spreadDown (Net me, kLayer_activationType activationType);
  32. void Net_spreadDown_reconstruction (Net me);
  33. void Net_spreadUp_reconstruction (Net me);
  34. void Net_sampleInput (Net me);
  35. void Net_sampleOutput (Net me);
  36. void Net_update (Net me, double learningRate);
  37. void Net_PatternList_applyToInput (Net me, PatternList thee, integer rowNumber);
  38. void Net_PatternList_applyToOutput (Net me, PatternList thee, integer rowNumber);
  39. void Net_PatternList_learn (Net me, PatternList thee, double learningRate);
  40. void Net_PatternList_learnByLayer (Net me, PatternList thee, double learningRate);
  41. autoActivationList Net_PatternList_to_ActivationList (Net me, PatternList thee, kLayer_activationType activationType);
  42. autoMatrix Net_extractInputActivities (Net me);
  43. autoMatrix Net_extractOutputActivities (Net me);
  44. autoMatrix Net_extractInputReconstruction (Net me);
  45. autoMatrix Net_extractOutputReconstruction (Net me);
  46. autoMatrix Net_extractInputBiases (Net me, integer layerNumber);
  47. autoMatrix Net_extractOutputBiases (Net me, integer layerNumber);
  48. autoMatrix Net_extractWeights (Net me, integer layerNumber);
  49. autoMAT Net_getWeights (Net me, integer layerNumber);
  50. /* End of file Net.h */
  51. #endif