| 1 | /* Layer_def.h |
| 2 | * |
| 3 | * Copyright (C) 2017-2018 Paul Boersma |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This code is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 | * See the GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | |
| 20 | #define ooSTRUCT Layer |
| 21 | oo_DEFINE_CLASS (Layer, Daata) |
| 22 | |
| 23 | oo_INTEGER (numberOfInputNodes) |
| 24 | oo_VEC (inputActivities, numberOfInputNodes) |
| 25 | oo_INTEGER (numberOfOutputNodes) |
| 26 | oo_VEC (outputActivities, numberOfOutputNodes) |
| 27 | |
| 28 | #if oo_DECLARING |
| 29 | virtual void v_spreadUp (kLayer_activationType) { } |
| 30 | virtual void v_sampleInput () { } |
| 31 | virtual void v_spreadDown (kLayer_activationType) { } |
| 32 | virtual void v_spreadDown_reconstruction () { } |
| 33 | virtual void v_spreadUp_reconstruction () { } |
| 34 | virtual void v_update (double learningRate) { } |
| 35 | virtual void v_updateFirstPhase (double learningRate) { } |
| 36 | virtual void v_updateSecondPhase (double learningRate) { } |
| 37 | virtual autoMatrix v_extractInputReconstruction () { return autoMatrix (); } |
| 38 | virtual autoMatrix v_extractOutputReconstruction () { return autoMatrix (); } |
| 39 | virtual autoMatrix v_extractInputBiases () { return autoMatrix (); } |
| 40 | virtual autoMatrix v_extractOutputBiases () { return autoMatrix (); } |
| 41 | virtual autoMatrix v_extractWeights () { return autoMatrix (); } |
| 42 | virtual autoMAT v_getWeights () { return autoMAT (); } |
| 43 | #endif |
| 44 | |
| 45 | oo_END_CLASS (Layer) |
| 46 | #undef ooSTRUCT |
| 47 | |
| 48 | |
| 49 | /* End of file Layer_def.h */ |