Menu

#1 nn_trainNN.m throws an error if trainIterations is empty

v2015.03.31
closed
aQaSoft
None
2015-04-19
2015-04-18
aQaSoft
No

If any non scalar value or a number less than 1 is used as trainIterations, as of version nn22_v2015.03.31, nn_trainNN.m would throw "unknown variable" errors inside the main training routine.

Discussion

  • aQaSoft

    aQaSoft - 2015-04-18

    The variable trainIterations may be left empty by accident pressing Enter at the "How many training itarations do you want?" without entering a value.

     
  • aQaSoft

    aQaSoft - 2015-04-18

    If any non scalar value or a number less than 1 is used as trainIterations, as of version nn22_v2015.03.31, nn_trainNN.m would throw "unknown variable" errors inside the main training routine.

    The following added lines (#73 to #79) solve the issue.

    % It may happen that trainIterations is not defined or is less than 1...
    if (~isscalar(trainIterations) || trainIterations < 1) 
        fprintf('\n');
        fprintf(msG.error_trainIterations_IsNotDefinedOrIsLessThan1);
        returnOK = 1; return, 
    end
    



    At the same time, the corresponding message lines (#117) were added in both "nn_localization_en_US.m" and "nn_localization_es_AR.m".

     

    Last edit: aQaSoft 2015-04-18

Log in to post a comment.

MongoDB Logo MongoDB