def unpack_params(self, hyper):
t_ind = 0
a = hyper[0];t_ind+=1
b = hyper[1];t_ind+=1
c = hyper[2];t_ind+=1
l_f = hyper[t_ind:t_ind+self.D*self.S];t_ind+=self.D*self.S
l_F = TT.reshape(l_f, (self.D, self.S))
r_f = hyper[t_ind:t_ind+self.M*self.S];t_ind+=self.M*self.S
r_F = TT.reshape(r_f, (self.M, self.S))
F = l_F.dot(r_F.T)
l_p = hyper[t_ind:t_ind+self.S];t_ind+=self.S
l_P = TT.reshape(l_p, (1, self.S))
p = hyper[t_ind:t_ind+self.M];t_ind+=self.M
P = TT.reshape(p, (1, self.M))
l_FC = l_P-TT.mean(l_F, 0)[None, :]
FC = P-TT.mean(F, 0)[None, :]
return a, b, c, l_F, F, l_FC, FC
评论列表
文章目录