next up previous contents index
Next: Simulator Kernel Implementation Up: Transfer Functions Previous: Predefined Transfer Functions

User Defined Transfer Functions

    The group of transfer functions can be exented arbitrarily by the user. In order to make them available inside SNNS the following steps have to be performed:

  1. In file `` .../SNNSv3.3/kernel/func_tbl.c the name of the function has to be inserted in the function table. An example entry for an activation function would be

    "Act_MyFunction",ACT_FUNC, 0, 0, (FunctionPtr) MyFancyFunction,

    Notice that the second entry defines the type (activation, initialization, etc.) of the new function!

    If the new function is an activation function, the corresponding derivation function has also to be inserted in the function table. E.g.:
    "Act_MyFunction",ACT_DERIV_FUNC, 0, 0, (FunctionPtr)ACT_DERIV_MFF,

    This entry has to be given, even if no such derivation function exists in the mathematical sense. In that case ``ACT_DERIV_Dummy'' has to be specified as name of the derivation function.

    If the function exists, it has to be declared and implemented just as the activation function.

    Please note, that activation and derivation function have to have the same name suffix (here: ``MyFunction'')!

  2. The functions must be implemented as C programs in following files:

    activation functions in `` .../SNNSv3.3/kernel/trans_f.c''
    output functions in `` .../SNNSv3.3/kernel/trans_f.c''
    site functions in `` .../SNNSv3.3/kernel/trans_f.c''
    initialization functions in `` .../SNNSv3.3/kernel/init_f.c''
    learning functions in `` .../SNNSv3.3/kernel/learn_f.c''
    update functions in `` .../SNNSv3.3/kernel/update_f.c''

    The name of the implemented function has to match the name specified in the function table!

  3. Function prototypes have to be defined in the corresponding header (.h) and private header files (.ph).

  4. Go to the SNNSv3.3 root directory and build (using the command 'build') new executables. Remember that if you don't recompile, the modification to the kernel won't take any effect.

The new function should be available now in the user interface together with all predefined functions.



next up previous contents index
Next: Simulator Kernel Implementation Up: Transfer Functions Previous: Predefined Transfer Functions



Niels Mache
Wed May 17 11:23:58 MET DST 1995