Skip to main content
. 2019 Dec 31;20(1):236. doi: 10.3390/s20010236
Algorithm 1. Training algorithm.
Require: xi = input images
Require: L = set of training input indices with known labels
Require: yi = labels for labeled inputs, iL
Require:bbi = bounding box of sample i
Require:W_u = unsupervised loss weight
Require:fθ(x) = neural network with trainable parameters θ as student model
Require:fθ(x) = neural network as teacher model whose parameter θ with initial value θ
Require:α = moving average momentum for parameters
Require:η = random Gaussian noise added to the input
fort in [1, num_iterations] do
draw a mini-batch B from labeled and unlabeled samples randomly
fifθ(xiB,bbiB,η) evaluate network outputs
fifθ(xiB,bbiB,η) evaluate network outputs
 Find triplets T of components <i, j, k> in B where yi=yj and yiyj; yi is the pseudo label given by fi if i(BL)
 loss1|BL|i(BL)yilogfi
+W_u(1|{i|i(BL)}|i(BL)fifi2)+W_u(1|T|i,j,kBlG(i,j)+lG(i,k))
update θ using ADAM optimizer
update θ by θt=αθt1+(1α)θt
end for
return θ