Skip to main content
. 2021 Nov 2;21(21):7306. doi: 10.3390/s21217306
Algorithm 2: Hybridized SSA.
Input:Handwritten text dataset (sequence of letters and digits)
N → number of salps in the swarm.
D → number of dimensions of the given problem.
X → Initialize a swarm of salps with respect to lb and ub.
F → The best search agent (Food source).
       while (Stopping criterion is not met) do 
           for each salp 2 X do
               Decodes the salp to a CRNN network (See Section 3.2)
               Train the CRNN on part of the training set.
               Evaluates the salp’s fitness based on part of the validation set.
               Update the positions of the salps.
               F Get the best salp.
               for i =(1 to N) do
               Fit xi to its boundaries.
               if f(xi) < f(F) then
               F = xi
               if rand() < lp then
               F local search(F)
Output: Best CRNN con_guration (F)