|
| DECLARE_SNIPPET (Conv2D, 12) |
|
virtual StringVec | getParamNames () const override |
| Gets names of of (independent) model parameters. More...
|
|
| SET_ROW_BUILD_STATE_VARS ({{"inRow", "int", "($(id_pre) / (int)$(conv_ic)) / (int)$(conv_iw)"}, {"inCol", "int", "($(id_pre) / (int)$(conv_ic)) % (int)$(conv_iw)"}, {"inChan", "int", "$(id_pre) % (int)$(conv_ic)"}, {"outRow", "int", "min((int)$(conv_oh), max(0, 1 + (int)floor((inRow + $(conv_padh) - $(conv_kh)) / $(conv_sh))))"}, {"maxOutRow", "int", "min((int)$(conv_oh), max(0, 1 + ((inRow + (int)$(conv_padh)) / (int)$(conv_sh))))"}, {"minOutCol", "int", "min((int)$(conv_ow), max(0, 1 + (int)floor((inCol + $(conv_padw) - $(conv_kw)) / $(conv_sw))))"}, {"maxOutCol", "int", "min((int)$(conv_ow), max(0, 1 + ((inCol + (int)$(conv_padw)) / (int)$(conv_sw))))"}}) |
|
| SET_ROW_BUILD_CODE ("if($(outRow) == $(maxOutRow)) {\ " $(endRow);\" "}\" "const int strideRow=($(outRow) *(int)$(conv_sh)) -(int)$(conv_padh);\" "const int kernRow=$(inRow) - strideRow;\" "for(int outCol=$(minOutCol);outCol< $(maxOutCol);outCol++) {\" " const int strideCol=(outCol *(int)$(conv_sw)) -(int)$(conv_padw);\" " const int kernCol=$(inCol) - strideCol;\" " for(unsigned int outChan=0;outChan<(unsigned int)$(conv_oc);outChan++) {\" " const int idPost=(($(outRow) *(int)$(conv_ow) *(int)$(conv_oc))+\" "(outCol *(int)$(conv_oc))+\" " outChan);\" " $(addSynapse, idPost, kernRow, kernCol, $(inChan), outChan);\" " }\" "}\" "$(outRow)++;\") |
|
| SET_CALC_MAX_ROW_LENGTH_FUNC ([](unsigned int, unsigned int, const std::vector< double > &pars) { const double conv_kh=pars[0];const double conv_kw=pars[1];const double conv_sh=pars[2];const double conv_sw=pars[3];const unsigned int conv_oc=(unsigned int) pars[11];return(unsigned int) std::ceil(conv_kh/conv_sh) *(unsigned int) std::ceil(conv_kw/conv_sw) *conv_oc;}) |
|
| SET_CALC_KERNEL_SIZE_FUNC ([](const std::vector< double > &pars) ->std::vector< unsigned int > { return {(unsigned int) pars[0],(unsigned int) pars[1],(unsigned int) pars[8],(unsigned int) pars[11]};}) |
|
virtual std::string | getRowBuildCode () const |
|
virtual ParamValVec | getRowBuildStateVars () const |
|
virtual std::string | getColBuildCode () const |
|
virtual ParamValVec | getColBuildStateVars () const |
|
virtual std::string | getHostInitCode () 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 CalcMaxLengthFunc | getCalcMaxColLengthFunc () const |
| Get function to calculate the maximum column 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 DerivedParamVec | getDerivedParams () const |
|
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 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.
This sparse connectivity snippet does not support multiple threads per neuron