if compute_L2_norm:
                    l2_norm_swa_i = compute_l2_norm(W_mean, W_sigma, means_vb_swa, L_vb_swa)
                    l2_norm_rms_i = compute_l2_norm(W_mean, W_sigma, means_vb_rms, L_vb_rms)
                    l2_norm_clr2_i = compute_l2_norm(W_mean, W_sigma, means_vb_clr, L_vb_clr)
                    mean_i = means_vb_clr[0]
                    mean_list_i[n, itt] = mean_i
                    sigma_i = L_vb_clr[0,0]
                    sigmas_list_i[n, itt] = sigma_i
                    #print(mean_i)

                    l2_norm_swa_hmc_i = compute_l2_norm(params_hmc_mean, params_hmc_sigmas, means_vb_swa, L_vb_swa)
                    l2_norm_rms_hmc_i = compute_l2_norm(params_hmc_mean, params_hmc_sigmas, means_vb_rms, L_vb_rms)
                    l2_norm_clr_hmc_i = compute_l2_norm(params_hmc_mean, params_hmc_sigmas, means_vb_clr, L_vb_clr)

                    l2_norm_hmc_swa_means_i = compute_l2_norm_means(params_hmc_mean, means_vb_swa)
                    l2_norm_hmc_swa_sigmas_i = compute_l2_norm_Sigmas(params_hmc_sigmas, np.diag(L_vb_swa))
                    l2_norm_hmc_rms_means_i = compute_l2_norm_means(params_hmc_mean, means_vb_rms)
                    l2_norm_hmc_rms_sigmas_i = compute_l2_norm_Sigmas(params_hmc_sigmas, np.diag(L_vb_rms))
                    l2_norm_hmc_clr_means_i = compute_l2_norm_means(params_hmc_mean, means_vb_clr)
                    l2_norm_hmc_clr_sigmas_i = compute_l2_norm_Sigmas(params_hmc_sigmas, np.diag(L_vb_clr))

                    l2_norm_means_hmc_swa.append(l2_norm_hmc_swa_means_i)
                    l2_norm_means_hmc_rms.append(l2_norm_hmc_rms_means_i)
                    l2_norm_means_hmc_clr.append(l2_norm_hmc_clr_means_i)

                    l2_norm_sigmas_hmc_swa.append(l2_norm_hmc_swa_sigmas_i)
                    l2_norm_sigmas_hmc_rms.append(l2_norm_hmc_rms_sigmas_i)
                    l2_norm_sigmas_hmc_clr.append(l2_norm_hmc_clr_sigmas_i)

                    l2_norm_hmc_swa.append(l2_norm_swa_hmc_i)
                    l2_norm_hmc_rms.append(l2_norm_rms_hmc_i)
Beispiel #2
0
                #l2_norm_clr_i = compute_l2_norm(W_mean, W_cov, means_vb_clr, sigmas_vb_clr)
                l2_norm_swa_i = compute_l2_norm(W_mean, W_cov, means_vb_swa,
                                                sigmas_vb_swa)
                l2_norm_rms_i = compute_l2_norm(W_mean, W_cov, means_vb_rms,
                                                sigmas_vb_rms)
                l2_norm_clr2_i = compute_l2_norm(W_mean, W_cov, means_vb_clr2,
                                                 sigmas_vb_clr2)
                mean_i = means_vb_clr2[0]
                mean_list_i[n, itt] = mean_i
                #print(mean_i)

                #l2_norm_clr_means_i = compute_l2_norm_means(W_mean, means_vb_clr)
                #l2_norm_clr_sigmas_i = compute_l2_norm_Sigmas(W_cov, sigmas_vb_clr)
                l2_norm_swa_means_i = compute_l2_norm_means(
                    W_mean, means_vb_swa)
                l2_norm_swa_sigmas_i = compute_l2_norm_Sigmas(
                    W_cov, sigmas_vb_swa)
                l2_norm_rms_means_i = compute_l2_norm_means(
                    W_mean, means_vb_rms)
                l2_norm_rms_sigmas_i = compute_l2_norm_Sigmas(
                    W_cov, sigmas_vb_rms)
                l2_norm_clr2_means_i = compute_l2_norm_means(
                    W_mean, means_vb_clr2)
                l2_norm_clr2_sigmas_i = compute_l2_norm_Sigmas(
                    W_cov, sigmas_vb_clr2)

                l2_norm_clr_hmc_i = compute_l2_norm(params_hmc_mean,
                                                    params_hmc_sigmas,
                                                    means_vb_clr,
                                                    sigmas_vb_clr)
                l2_norm_swa_hmc_i = compute_l2_norm(params_hmc_mean,
                                                    params_hmc_sigmas,
Beispiel #3
0
                    sigmas_list_i[n, itt] = sigma_i
                    #print(mean_i)

                    l2_norm_swa_hmc_i = compute_l2_norm(
                        params_hmc_mean, params_hmc_sigmas, means_vb_swa,
                        L_vb_swa)
                    l2_norm_rms_hmc_i = compute_l2_norm(
                        params_hmc_mean, params_hmc_sigmas, means_vb_rms,
                        L_vb_rms)
                    l2_norm_clr_hmc_i = compute_l2_norm(
                        params_hmc_mean, params_hmc_sigmas, means_vb_clr,
                        L_vb_clr)

                    l2_norm_hmc_swa_means_i = compute_l2_norm_means(
                        params_hmc_mean, means_vb_swa)
                    l2_norm_hmc_swa_sigmas_i = compute_l2_norm_Sigmas(
                        params_hmc_sigmas, np.diag(L_vb_swa))
                    l2_norm_hmc_rms_means_i = compute_l2_norm_means(
                        params_hmc_mean, means_vb_rms)
                    l2_norm_hmc_rms_sigmas_i = compute_l2_norm_Sigmas(
                        params_hmc_sigmas, np.diag(L_vb_rms))
                    l2_norm_hmc_clr_means_i = compute_l2_norm_means(
                        params_hmc_mean, means_vb_clr)
                    l2_norm_hmc_clr_sigmas_i = compute_l2_norm_Sigmas(
                        params_hmc_sigmas, np.diag(L_vb_clr))

                    l2_norm_means_hmc_swa.append(l2_norm_hmc_swa_means_i)
                    l2_norm_means_hmc_rms.append(l2_norm_hmc_rms_means_i)
                    l2_norm_means_hmc_clr.append(l2_norm_hmc_clr_means_i)

                    l2_norm_sigmas_hmc_swa.append(l2_norm_hmc_swa_sigmas_i)
                    l2_norm_sigmas_hmc_rms.append(l2_norm_hmc_rms_sigmas_i)