Given an image \(x_n \in \mathbb {R}^{m\times n}\)  from the either labeled or the unlabeled set, the CNN acts as a function \(f_n :\mathbb {R}^{m\times n} \rightarrow \mathbb {R}^c\)  with the parameters \(\theta _n\)  that maps \(x_n\)  to a c-dimensional representation, where c is the number of classes. Assume that \(X_u=\lbrace x^{\prime }_1,...,x^{\prime }_n\rbrace \)  is the set of CNN outputs extracted from the unlabeled data. As noted in [1]}, the Wasserstein barycenter of the unlabeled set \(X_u\)  is equivalent to Lloyd's algorithm, where the maximization step (i.e., the assignment of the weight of each data point to its closest centroid) is equivalent to
the computation of \(\mathbf {\alpha }^{\prime }\)  in dual form, while the expectation step (i.e., the re-centering step) is equivalent to the update for centers \(Y\)  using
the optimal transport, which in this case is equivalent to the trivial transportation plan that assigns the weight (divided by \(n\) ) of each unlabeled data in \(X_u\)  to its closest neighbor in centers \(Y\) . Algorithm 1 shows the Wasserstein barycenter of the unlabeled data for clustering.
[H]
: Wasserstein barycenter of the unlabeled Data
input: \(X_u \in \mathbb {R}^{c\times n}, b \in \Delta _n\) 
[1]

initialize: \(Y \in \mathbb {R}^{c\times k}\)  and \(a \in \theta \) 
\(Y\)  and \(a\)  have not converged
Maximization Step:
set \(\hat{a} = \tilde{a}= {\textbf {1}_n}{n}\) 
not converged
\(\beta =(t+1)/2\) , \(a\leftarrow {(1-\beta ^{-1})\hat{a}+\beta ^{-1}\tilde{a}}\) 
\(\alpha \leftarrow \)  \(\mathbf {\alpha }^{\prime }\)  dual optimal form \(\textbf {d}(a,b, M_{X_u Y})\) 
\(\tilde{a} \leftarrow \tilde{a} \circ e^{-t_0\beta \alpha }; \tilde{a} \leftarrow {\tilde{a}}{\tilde{a}^ \top } \textbf {1}_n\) 
\(\hat{a} \leftarrow (1-\beta ^{-1})\hat{a}+\beta ^{-1}\tilde{a}\) , \(t \leftarrow t+1\) 
\(a\leftarrow \hat{a} \) 
Expectation Step:
\(T^{\prime }\leftarrow \)  optimal coupling of \(\textbf {p}(a,b,M_{X_u Y})\) 
\(Y\leftarrow (1-\theta ) Y+\theta (XT^{^{\prime }\top })\text{diag}(a^{-1})\) , \(\theta \in [0,1]\)
