Inps = readtable("D:\RacingFormBook\Res.xlsx", opts, "UseExcel", false);
Inps = removevars(Inps, 'FPos');
[GN, ~, CourseC] = unique(Inps(:,3));
[GN, ~, GoingC] = unique(Inps(:,4));
[GN, ~, HorseC] = unique(Inps(:,5));
[GN, ~, JockeyC] = unique(Inps(:,6));
[GN, ~, TrainerC] = unique(Inps(:,9));
Inps = removevars(Inps, {'Course','Going','HorseName','Jockey','Trainer'});
InpsM = table2array(Inps);
InpsMC=cat(2,InpsM,CourseC,GoingC,HorseC,JockeyC,TrainerC);
clear GoingC HorseC TrainerC CourseC JockeyC GN Inps Outs InpsM
InpsMCG=gpuArray(InpsMC);
net=feedforwardnet([60,30,1]);
net.trainFcn = 'trainscg';
net=train(net,InpsMCG,OutsMG);