Skip to main content
. 2021 Jul 10;21(14):4720. doi: 10.3390/s21144720
Algorithm1. Training procedure of the SPA model
Input: Original input frame clips xg
Output: θ of SPA model
1: Initialize xp, θ0, t=0
2: fglobal=Feature_extractor(xg)
3: while kKdo
4: while tTdo
5: fsaliency=Feature_extractor(xtp)
6:     Get logits through fglobal, fsaliency
7:      str=cat(fglobal, fsaliency,logits)
8:  Get {amt} from Policy π(at|str;θ)
9:  Crop xg by {amt} getting xt+1p
10: rt=reward(xg,xtp,xt+1p)
11: Estimate advantage A^t
12:     t=t+1
13:   end while
14: while jNbatchdo
15:  Calculate θkCLIP(θkj)
16:  Update θkj with gradient θkCLIP(θkj)
17:   end while
18:   k=k+1
19: end while