|
| DECLARE_SNIPPET (AvgPoolConv2D, 12) |
|
virtual StringVec | getParamNames () const override |
| Gets names of of (independent) model parameters. More...
|
|
virtual DerivedParamVec | getDerivedParams () const override |
|
| SET_DIAGONAL_BUILD_STATE_VARS ({{"kernRow", "int", "($(id_diag) / (int)$(conv_oc)) / (int)$(conv_kw)"}, {"kernCol", "int", "($(id_diag) / (int)$(conv_oc)) % (int)$(conv_kw)"}, {"kernOutChan", "int", "$(id_diag) % (int)$(conv_oc)"}, {"flipKernRow", "int", "(int)$(conv_kh) - $(kernRow) - 1"}, {"flipKernCol", "int", "(int)$(conv_kw) - $(kernCol) - 1"}}) |
|
| SET_DIAGONAL_BUILD_CODE ("// Convert spike ID into row, column and channel going INTO pool\ "const int prePoolInRow=($(id_pre)/(int)$(pool_ic))/(int)$(pool_iw);\" "const int prePoolInCol=($(id_pre)/(int)$(pool_ic)) %(int)$(pool_iw);\" "const int preChan=$(id_pre) %(int)$(pool_ic);\" "//Calculate row and column going OUT of pool\" "const int poolPreOutRow=prePoolInRow/(int)$(pool_sh);\" "const int poolStrideRow=poolPreOutRow *(int)$(pool_sh);\" "const int poolPreOutCol=prePoolInCol/(int)$(pool_sw);\" "const int poolStrideCol=poolPreOutCol *(int)$(pool_sw);\" "if(prePoolInRow<(poolStrideRow+(int)$(pool_kh)) &&prePoolInCol<(poolStrideCol+(int)$(pool_kw))) {\" "//If we haven 't gone off edge of output\" " const int postRow=poolPreOutRow+$(kernRow) -(int)$(conv_bh);\" " const int postCol=poolPreOutCol+$(kernCol) -(int)$(conv_bw);\" " if(postRow >=0 &&postCol >=0 &&postRow<(int)$(conv_oh) &&postCol<(int)$(conv_ow)) {\" "//Calculate postsynaptic index\" " const int postInd=((postRow *(int)$(conv_ow) *(int)$(conv_oc))+\" "(postCol *(int)$(conv_oc))+\" " $(kernOutChan));\" " $(addSynapse, postInd, $(flipKernRow), $(flipKernCol), preChan, $(kernOutChan));\" " }\" "}\") |
|
| SET_CALC_MAX_ROW_LENGTH_FUNC ([](unsigned int, unsigned int, const std::vector< double > &pars) { const unsigned int convKH=(unsigned int) pars[0];const unsigned int convKW=(unsigned int) pars[1];const unsigned int convOC=(unsigned int) pars[11];return(convKH *convKW *convOC);}) |
|
| SET_CALC_KERNEL_SIZE_FUNC ([](const std::vector< double > &pars) ->std::vector< unsigned int > { const unsigned int convKH=(unsigned int) pars[0];const unsigned int convKW=(unsigned int) pars[1];const unsigned int poolIC=(unsigned int) pars[8];const unsigned int convOC=(unsigned int) pars[11];return {convKH, convKW, poolIC, convOC};}) |
|
virtual std::string | getDiagonalBuildCode () const |
|
virtual ParamValVec | getDiagonalBuildStateVars () const |
|
virtual CalcMaxLengthFunc | getCalcMaxRowLengthFunc () const |
| Get function to calculate the maximum row length of this connector based on the parameters and the size of the pre and postsynaptic population. More...
|
|
virtual CalcKernelSizeFunc | getCalcKernelSizeFunc () const |
| Get function to calculate kernel size required for this conenctor based on its parameters. More...
|
|
boost::uuids::detail::sha1::digest_type | getHashDigest () const |
| Update hash from snippet. More...
|
|
void | validate () const |
| Validate names of parameters etc. More...
|
|
virtual | ~Base () |
|
virtual EGPVec | getExtraGlobalParams () const |
|
size_t | getExtraGlobalParamIndex (const std::string ¶mName) const |
| Find the index of a named extra global parameter. More...
|
|
Initialises convolutional connectivity preceded by averaging pooling Row build state variables are used to convert presynaptic neuron index to rows, columns and channels and, from these, to calculate the range of postsynaptic rows, columns and channels connections will be made within.