Hello, I am currently working on a project to identify a cat face inside an image using GA, I had a trained neural network that can classify whether the input image is cat or not. My problem is in developing the GA to find the best window that can correspond to the cat face, I have developed a custom popoulation func & custom fitness func but I had this error Error in Genetic_Algorithm_NN>PopFunction (line 32) I = imread('C:\Users\Mohamed\Desktop\Neural Networks\Assignment 3\100cats\00000016_018.jpg');
Error using fevalOutput argument "pop" (and maybe others) not assigned during call to"C:\Users\Mohamed\Desktop\Neural Networks\Assignment3\Genetic_Algorithm_NN.m>PopFunction".Error in makeState (line 30) state.Population = feval(options.CreationFcn,GenomeLength,FitnessFcn,options,options.CreationFcnArgs{:});Error in gaunc (line 41)state =makeState(GenomeLength,FitnessFcn,Iterate,output.problemtype,options);Error in ga (line 348) [x,fval,exitFlag,output,population,scores] = gaunc(FitnessFcn,nvars, ...Error in Genetic_Algorithm_NN (line 24)[chromosome,~,~,~,~,~] = ga(@FitFunc,nvars,options);
I am really stuck and I don't know what should be fixed, you kindly help is highly appreciated I will post the code in the next comment thanks
Best Answer