MATLAB: Do I receive the error message “Training function ‘SrchFcn’ does not have a legal value” when using the NNTOOL within the Neural Network Toolbox

Deep Learning Toolboxfunctionnntoolsearchsrchfcntraincgptraining

Why do I receive the error message "Training function 'SrchFcn' does not have a legal value" when using the NNTOOL within the Neural Network Toolbox?
This behavior can be reproduced by the following steps:
1) Open the interactive tool by typing "nntool" at the MATLAB Command Prompt.
2) Click "New Network", set the "Training Function" field to "TrainCGP", and click "Create".
3) Select "network1", click "Train", then click "Train Network".
This will generate the error message "Training function 'SrchFcn' does not have a legal value".

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This has been verified as a bug in the NNTOOL within the Neural Network Toolbox in the way the "Search Function" field is used with the "TrainCGP" training function.
Currently, to work around this issue, you must add single quote marks around the "Search Function" field on the "Training Paramters" tab.
Related Question