include("aux_func.jl") using LinearAlgebra using Statistics using DataFrames using Printf #= Obtain energy data =# #mni_folder_1 = "ini_exp_data/" mni_folder_100 = "exp_100_epochs/"; cif_folder_100 = "CIFAR_100_epoch/"; mni_folder_acc = "data_bounded/"; cif_folder_acc = "CIFAR_acc_bound/"; mni_folder_wat = "data_budget/"; cif_folder_wat = "CIFAR_energy_bound/"; mni_folder_est = "early_stop_res/"; cif_folder_est = "CIFAR_early_stop/"; bayes_model = "bayes"; freq_model = "freq"; w_type = "watt"; e_type = "exp"; #= Load GPU data =# mni_100_bay_ene = getgpudata(mni_folder_100, bayes_model, w_type, "eo"); mni_100_fre_ene = getgpudata(mni_folder_100, freq_model, w_type, "eo"); cif_100_bay_ene = getgpudata(cif_folder_100, bayes_model, w_type, "eo"); cif_100_fre_ene = getgpudata(cif_folder_100, freq_model, w_type, "eo"); mni_acc_bay_ene = getgpudata(mni_folder_acc, bayes_model, w_type, "eo"); mni_acc_fre_ene = getgpudata(mni_folder_acc, freq_model, w_type, "eo"); cif_acc_bay_ene = getgpudata(cif_folder_acc, bayes_model, w_type, "eo"); cif_acc_fre_ene = getgpudata(cif_folder_acc, freq_model, w_type, "eo"); mni_wat_bay_ene = getgpudata(mni_folder_wat, bayes_model, w_type, "eo"); mni_wat_fre_ene = getgpudata(mni_folder_wat, freq_model, w_type, "eo"); cif_wat_bay_ene = getgpudata(cif_folder_wat, bayes_model, w_type, "eo"); cif_wat_fre_ene = getgpudata(cif_folder_wat, freq_model, w_type, "eo"); mni_est_bay_ene = getgpudata(mni_folder_est, bayes_model, w_type, "eo"); mni_est_fre_ene = getgpudata(mni_folder_est, freq_model, w_type, "eo"); cif_est_bay_ene = getgpudata(cif_folder_est, bayes_model, w_type, "eo"); cif_est_fre_ene = getgpudata(cif_folder_est, freq_model, w_type, "eo"); #= Define CPU paths =# cif = "cifar"; mni = "mnist"; bay = "bayes"; wat = "cpu_watts"; frq = "freq"; ram = "ram_use"; _100 = "100"; acc = "acc"; es = "es"; wbud = "wbud"; #= Load CPU data =# bay_cif_100_ene = readcpudata(cif, bay, wat, _100); bay_mni_100_ene = readcpudata(mni, bay, wat, _100); frq_cif_100_ene = readcpudata(cif, frq, wat, _100); frq_mni_100_ene = readcpudata(mni, frq, wat, _100); bay_cif_acc_ene = readcpudata(cif, bay, wat, acc); bay_mni_acc_ene = readcpudata(mni, bay, wat, acc); frq_cif_acc_ene = readcpudata(cif, frq, wat, acc); frq_mni_acc_ene = readcpudata(mni, frq, wat, acc); bay_cif_wbu_ene = readcpudata(cif, bay, wat, wbud); bay_mni_wbu_ene = readcpudata(mni, bay, wat, wbud); frq_cif_wbu_ene = readcpudata(cif, frq, wat, wbud); frq_mni_wbu_ene = readcpudata(mni, frq, wat, wbud); bay_mni_est_ene = readcpudata(mni, bay, wat, es); bay_cif_est_ene = readcpudata(cif, bay, wat, es); frq_cif_est_ene = readcpudata(cif, frq, wat, es); frq_mni_est_ene = readcpudata(mni, frq, wat, es); for s = 1:5 bay_cif_acc_ene[s] = round.(getcpuwatt(bay_cif_acc_ene[s])) bay_cif_est_ene[s] = round.(getcpuwatt(bay_cif_est_ene[s])) bay_cif_wbu_ene[s] = round.(getcpuwatt(bay_cif_wbu_ene[s])) bay_cif_100_ene[s] = round.(getcpuwatt(bay_cif_100_ene[s])) bay_mni_acc_ene[s] = round.(getcpuwatt(bay_mni_acc_ene[s])) bay_mni_est_ene[s] = round.(getcpuwatt(bay_mni_est_ene[s])) bay_mni_wbu_ene[s] = round.(getcpuwatt(bay_mni_wbu_ene[s])) bay_mni_100_ene[s] = round.(getcpuwatt(bay_mni_100_ene[s])) frq_cif_acc_ene[s] = round.(getcpuwatt(frq_cif_acc_ene[s])) frq_cif_est_ene[s] = round.(getcpuwatt(frq_cif_est_ene[s])) frq_cif_wbu_ene[s] = round.(getcpuwatt(frq_cif_wbu_ene[s])) frq_cif_100_ene[s] = round.(getcpuwatt(frq_cif_100_ene[s])) frq_mni_acc_ene[s] = round.(getcpuwatt(frq_mni_acc_ene[s])) frq_mni_est_ene[s] = round.(getcpuwatt(frq_mni_est_ene[s])) frq_mni_wbu_ene[s] = round.(getcpuwatt(frq_mni_wbu_ene[s])) frq_mni_100_ene[s] = round.(getcpuwatt(frq_mni_100_ene[s])) end for s = 1:5 mni_100_bay_ene[s]["Ene"] = vcat(mni_100_bay_ene[s]["Ene"], bay_mni_100_ene[s]) mni_100_fre_ene[s]["Ene"] = vcat(mni_100_fre_ene[s]["Ene"], frq_mni_100_ene[s]) cif_100_bay_ene[s]["Ene"] = vcat(cif_100_bay_ene[s]["Ene"], bay_cif_100_ene[s]) cif_100_fre_ene[s]["Ene"] = vcat(cif_100_fre_ene[s]["Ene"], frq_cif_100_ene[s]) mni_acc_bay_ene[s]["Ene"] = vcat(mni_acc_bay_ene[s]["Ene"], bay_mni_acc_ene[s]) mni_acc_fre_ene[s]["Ene"] = vcat(mni_acc_fre_ene[s]["Ene"], frq_mni_acc_ene[s]) cif_acc_bay_ene[s]["Ene"] = vcat(cif_acc_bay_ene[s]["Ene"], bay_cif_acc_ene[s]) cif_acc_fre_ene[s]["Ene"] = vcat(cif_acc_fre_ene[s]["Ene"], frq_cif_acc_ene[s]) mni_wat_bay_ene[s]["Ene"] = vcat(mni_wat_bay_ene[s]["Ene"], bay_mni_wbu_ene[s]) mni_wat_fre_ene[s]["Ene"] = vcat(mni_wat_fre_ene[s]["Ene"], frq_mni_wbu_ene[s]) cif_wat_bay_ene[s]["Ene"] = vcat(cif_wat_bay_ene[s]["Ene"], bay_cif_wbu_ene[s]) cif_wat_fre_ene[s]["Ene"] = vcat(cif_wat_fre_ene[s]["Ene"], frq_cif_wbu_ene[s]) mni_est_bay_ene[s]["Ene"] = vcat(mni_est_bay_ene[s]["Ene"], bay_mni_est_ene[s]) mni_est_fre_ene[s]["Ene"] = vcat(mni_est_fre_ene[s]["Ene"], frq_mni_est_ene[s]) cif_est_bay_ene[s]["Ene"] = vcat(cif_est_bay_ene[s]["Ene"], bay_cif_est_ene[s]) cif_est_fre_ene[s]["Ene"] = vcat(cif_est_fre_ene[s]["Ene"], frq_cif_est_ene[s]) end all_data_ene = Dict( "mni" => Dict( 1 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 2 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 3 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 4 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 5 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), ), "cif" => Dict( 1 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 2 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 3 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 4 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 5 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), ), ) for s = 1:5 all_data_ene["mni"][s]["100"]["bay"] = sum(mni_100_bay_ene[s]["Ene"][1:50]) all_data_ene["mni"][s]["100"]["frq"] = sum(mni_100_fre_ene[s]["Ene"][1:50]) all_data_ene["cif"][s]["100"]["bay"] = sum(cif_100_bay_ene[s]["Ene"][1:50]) all_data_ene["cif"][s]["100"]["frq"] = sum(cif_100_fre_ene[s]["Ene"][1:50]) all_data_ene["mni"][s]["acc"]["bay"] = sum(mni_acc_bay_ene[s]["Ene"]) all_data_ene["mni"][s]["acc"]["frq"] = sum(mni_acc_fre_ene[s]["Ene"]) all_data_ene["cif"][s]["acc"]["bay"] = sum(cif_acc_bay_ene[s]["Ene"]) all_data_ene["cif"][s]["acc"]["frq"] = sum(cif_acc_fre_ene[s]["Ene"]) all_data_ene["mni"][s]["wat"]["bay"] = sum(mni_wat_bay_ene[s]["Ene"]) all_data_ene["mni"][s]["wat"]["frq"] = sum(mni_wat_fre_ene[s]["Ene"]) all_data_ene["cif"][s]["wat"]["bay"] = sum(cif_wat_bay_ene[s]["Ene"]) all_data_ene["cif"][s]["wat"]["frq"] = sum(cif_wat_fre_ene[s]["Ene"]) all_data_ene["mni"][s]["est"]["bay"] = sum(mni_est_bay_ene[s]["Ene"]) all_data_ene["mni"][s]["est"]["frq"] = sum(mni_est_fre_ene[s]["Ene"]) all_data_ene["cif"][s]["est"]["bay"] = sum(cif_est_bay_ene[s]["Ene"]) all_data_ene["cif"][s]["est"]["frq"] = sum(cif_est_fre_ene[s]["Ene"]) end #= Load Accuracy data =# mni_100_bay_exp = getgpudata(mni_folder_100, bayes_model, e_type, "eo"); mni_100_fre_exp = getgpudata(mni_folder_100, freq_model, e_type, "eo"); cif_100_bay_exp = getgpudata(cif_folder_100, bayes_model, e_type, "eo"); cif_100_fre_exp = getgpudata(cif_folder_100, freq_model, e_type, "eo"); mni_acc_bay_exp = getgpudata(mni_folder_acc, bayes_model, e_type, "eo"); mni_acc_fre_exp = getgpudata(mni_folder_acc, freq_model, e_type, "eo"); cif_acc_bay_exp = getgpudata(cif_folder_acc, bayes_model, e_type, "eo"); cif_acc_fre_exp = getgpudata(cif_folder_acc, freq_model, e_type, "eo"); mni_wat_bay_exp = getgpudata(mni_folder_wat, bayes_model, e_type, "eo"); mni_wat_fre_exp = getgpudata(mni_folder_wat, freq_model, e_type, "eo"); cif_wat_bay_exp = getgpudata(cif_folder_wat, bayes_model, e_type, "eo"); cif_wat_fre_exp = getgpudata(cif_folder_wat, freq_model, e_type, "eo"); mni_est_bay_exp = getgpudata(mni_folder_est, bayes_model, e_type, "eo"); mni_est_fre_exp = getgpudata(mni_folder_est, freq_model, e_type, "eo"); cif_est_bay_exp = getgpudata(cif_folder_est, bayes_model, e_type, "eo"); cif_est_fre_exp = getgpudata(cif_folder_est, freq_model, e_type, "eo"); for i = 1:5 mni_100_bay_exp[i] = expdatatodict(mni_100_bay_exp[i]) mni_100_fre_exp[i] = expdatatodict(mni_100_fre_exp[i]) cif_100_bay_exp[i] = expdatatodict(cif_100_bay_exp[i]) cif_100_fre_exp[i] = expdatatodict(cif_100_fre_exp[i]) mni_acc_bay_exp[i] = expdatatodict(mni_acc_bay_exp[i]) mni_acc_fre_exp[i] = expdatatodict(mni_acc_fre_exp[i]) cif_acc_bay_exp[i] = expdatatodict(cif_acc_bay_exp[i]) cif_acc_fre_exp[i] = expdatatodict(cif_acc_fre_exp[i]) mni_wat_bay_exp[i] = expdatatodict(mni_wat_bay_exp[i]) mni_wat_fre_exp[i] = expdatatodict(mni_wat_fre_exp[i]) cif_wat_bay_exp[i] = expdatatodict(cif_wat_bay_exp[i]) cif_wat_fre_exp[i] = expdatatodict(cif_wat_fre_exp[i]) mni_est_bay_exp[i] = expdatatodict(mni_est_bay_exp[i]) mni_est_fre_exp[i] = expdatatodict(mni_est_fre_exp[i]) cif_est_bay_exp[i] = expdatatodict(cif_est_bay_exp[i]) cif_est_fre_exp[i] = expdatatodict(cif_est_fre_exp[i]) end all_data_exp = Dict( "mni" => Dict( 1 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 2 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 3 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 4 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 5 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), ), "cif" => Dict( 1 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 2 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 3 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 4 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), 5 => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), ), ) for s = 1:5 all_data_exp["mni"][s]["100"]["bay"] = (mean(mni_100_bay_exp[s]["acc"]) + mean(mni_100_bay_exp[s]["pre"])) / 2 all_data_exp["mni"][s]["100"]["frq"] = (mean(mni_100_fre_exp[s]["acc"]) + mean(mni_100_fre_exp[s]["pre"])) / 2 all_data_exp["cif"][s]["100"]["bay"] = (mean(cif_100_bay_exp[s]["acc"]) + mean(cif_100_bay_exp[s]["pre"])) / 2 all_data_exp["cif"][s]["100"]["frq"] = (mean(cif_100_fre_exp[s]["acc"]) + mean(cif_100_fre_exp[s]["pre"])) / 2 all_data_exp["mni"][s]["acc"]["bay"] = (mean(mni_acc_bay_exp[s]["acc"]) + mean(mni_acc_bay_exp[s]["pre"])) / 2 all_data_exp["mni"][s]["acc"]["frq"] = (mean(mni_acc_fre_exp[s]["acc"]) + mean(mni_acc_fre_exp[s]["pre"])) / 2 all_data_exp["cif"][s]["acc"]["bay"] = (mean(cif_acc_bay_exp[s]["acc"]) + mean(cif_acc_bay_exp[s]["pre"])) / 2 all_data_exp["cif"][s]["acc"]["frq"] = (mean(cif_acc_fre_exp[s]["acc"]) + mean(cif_acc_fre_exp[s]["pre"])) / 2 all_data_exp["mni"][s]["wat"]["bay"] = (mean(mni_wat_bay_exp[s]["acc"]) + mean(mni_wat_bay_exp[s]["pre"])) / 2 all_data_exp["mni"][s]["wat"]["frq"] = (mean(mni_wat_fre_exp[s]["acc"]) + mean(mni_wat_fre_exp[s]["pre"])) / 2 all_data_exp["cif"][s]["wat"]["bay"] = (mean(cif_wat_bay_exp[s]["acc"]) + mean(cif_wat_bay_exp[s]["pre"])) / 2 all_data_exp["cif"][s]["wat"]["frq"] = (mean(cif_wat_fre_exp[s]["acc"]) + mean(cif_wat_fre_exp[s]["pre"])) / 2 all_data_exp["mni"][s]["est"]["bay"] = (mean(mni_est_bay_exp[s]["acc"]) + mean(mni_est_bay_exp[s]["pre"])) / 2 all_data_exp["mni"][s]["est"]["frq"] = (mean(mni_est_fre_exp[s]["acc"]) + mean(mni_est_fre_exp[s]["pre"])) / 2 all_data_exp["cif"][s]["est"]["bay"] = (mean(cif_est_bay_exp[s]["acc"]) + mean(cif_est_bay_exp[s]["pre"])) / 2 all_data_exp["cif"][s]["est"]["frq"] = (mean(cif_est_fre_exp[s]["acc"]) + mean(cif_est_fre_exp[s]["pre"])) / 2 end #= # Per size efficiency =# efficiency_per_size = Dict( "frq" => Dict( "mni" => Dict( "100" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "est" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "acc" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "wat" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), ), "cif" => Dict( "100" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "est" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "acc" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "wat" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), ), ), "bay" => Dict( "mni" => Dict( "100" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "est" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "acc" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "wat" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), ), "cif" => Dict( "100" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "est" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "acc" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), "wat" => Dict("1" => 0.0, "2" => 0.0, "3" => 0.0, "4" => 0.0, "5" => 0.0), ), ), ) data_type = ["mni", "cif"] model_type = ["bay", "frq"] experiment_type = ["100", "est", "acc", "wat"] what = collect(Iterators.product(model_type, data_type, experiment_type, 1:5)) for t in what #@printf "model: $(t[1]), data: $(t[2]), experiment: $(t[3]), size: $(t[4])") #@printf all_data_exp[t[2]][t[4]][t[3]][t[1]]/all_data_ene[t[2]][t[4]][t[3]][t[1]] ) efficiency_per_size[t[1]][t[2]][t[3]][string(t[4])] = all_data_exp[t[2]][t[4]][t[3]][t[1]] / all_data_ene[t[2]][t[4]][t[3]][t[1]] end save_pickle("efficiency_per_size_sum_old.pkl", efficiency_per_size) save_pickle("energy_complete_sum_old.pkl", all_data_ene) #= # Accuracy means =# #= comp_exp = Dict( "mni" => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), "cif" => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), ) comp_exp["mni"]["100"]["frq"] = ( all_data_exp["mni"][1]["100"]["frq"] + all_data_exp["mni"][2]["100"]["frq"] + all_data_exp["mni"][3]["100"]["frq"] + all_data_exp["mni"][4]["100"]["frq"] + all_data_exp["mni"][5]["100"]["frq"] ) / 5 comp_exp["mni"]["100"]["bay"] = ( all_data_exp["mni"][1]["100"]["bay"] + all_data_exp["mni"][2]["100"]["bay"] + all_data_exp["mni"][3]["100"]["bay"] + all_data_exp["mni"][4]["100"]["bay"] + all_data_exp["mni"][5]["100"]["bay"] ) / 5 comp_exp["cif"]["100"]["frq"] = ( all_data_exp["cif"][1]["100"]["frq"] + all_data_exp["cif"][2]["100"]["frq"] + all_data_exp["cif"][3]["100"]["frq"] + all_data_exp["cif"][4]["100"]["frq"] + all_data_exp["cif"][5]["100"]["frq"] ) / 5 comp_exp["cif"]["100"]["bay"] = ( all_data_exp["cif"][1]["100"]["bay"] + all_data_exp["cif"][2]["100"]["bay"] + all_data_exp["cif"][3]["100"]["bay"] + all_data_exp["cif"][4]["100"]["bay"] + all_data_exp["cif"][5]["100"]["bay"] ) / 5 comp_exp["mni"]["acc"]["frq"] = ( all_data_exp["mni"][1]["acc"]["frq"] + all_data_exp["mni"][2]["acc"]["frq"] + all_data_exp["mni"][3]["acc"]["frq"] + all_data_exp["mni"][4]["acc"]["frq"] + all_data_exp["mni"][5]["acc"]["frq"] ) / 5 comp_exp["mni"]["acc"]["bay"] = ( all_data_exp["mni"][1]["acc"]["bay"] + all_data_exp["mni"][2]["acc"]["bay"] + all_data_exp["mni"][3]["acc"]["bay"] + all_data_exp["mni"][4]["acc"]["bay"] + all_data_exp["mni"][5]["acc"]["bay"] ) / 5 comp_exp["cif"]["acc"]["frq"] = ( all_data_exp["cif"][1]["acc"]["frq"] + all_data_exp["cif"][2]["acc"]["frq"] + all_data_exp["cif"][3]["acc"]["frq"] + all_data_exp["cif"][4]["acc"]["frq"] + all_data_exp["cif"][5]["acc"]["frq"] ) / 5 comp_exp["cif"]["acc"]["bay"] = ( all_data_exp["cif"][1]["acc"]["bay"] + all_data_exp["cif"][2]["acc"]["bay"] + all_data_exp["cif"][3]["acc"]["bay"] + all_data_exp["cif"][4]["acc"]["bay"] + all_data_exp["cif"][5]["acc"]["bay"] ) / 5 comp_exp["mni"]["wat"]["frq"] = ( all_data_exp["mni"][1]["wat"]["frq"] + all_data_exp["mni"][2]["wat"]["frq"] + all_data_exp["mni"][3]["wat"]["frq"] + all_data_exp["mni"][4]["wat"]["frq"] + all_data_exp["mni"][5]["wat"]["frq"] ) / 5 comp_exp["mni"]["wat"]["bay"] = ( all_data_exp["mni"][1]["wat"]["bay"] + all_data_exp["mni"][2]["wat"]["bay"] + all_data_exp["mni"][3]["wat"]["bay"] + all_data_exp["mni"][4]["wat"]["bay"] + all_data_exp["mni"][5]["wat"]["bay"] ) / 5 comp_exp["cif"]["wat"]["frq"] = ( all_data_exp["cif"][1]["wat"]["frq"] + all_data_exp["cif"][2]["wat"]["frq"] + all_data_exp["cif"][3]["wat"]["frq"] + all_data_exp["cif"][4]["wat"]["frq"] + all_data_exp["cif"][5]["wat"]["frq"] ) / 5 comp_exp["cif"]["wat"]["bay"] = ( all_data_exp["cif"][1]["wat"]["bay"] + all_data_exp["cif"][2]["wat"]["bay"] + all_data_exp["cif"][3]["wat"]["bay"] + all_data_exp["cif"][4]["wat"]["bay"] + all_data_exp["cif"][5]["wat"]["bay"] ) / 5 comp_exp["mni"]["est"]["frq"] = ( all_data_exp["mni"][1]["est"]["frq"] + all_data_exp["mni"][2]["est"]["frq"] + all_data_exp["mni"][3]["est"]["frq"] + all_data_exp["mni"][4]["est"]["frq"] + all_data_exp["mni"][5]["est"]["frq"] ) / 5 comp_exp["mni"]["est"]["bay"] = ( all_data_exp["mni"][1]["est"]["bay"] + all_data_exp["mni"][2]["est"]["bay"] + all_data_exp["mni"][3]["est"]["bay"] + all_data_exp["mni"][4]["est"]["bay"] + all_data_exp["mni"][5]["est"]["bay"] ) / 5 comp_exp["cif"]["est"]["frq"] = ( all_data_exp["cif"][1]["est"]["frq"] + all_data_exp["cif"][2]["est"]["frq"] + all_data_exp["cif"][3]["est"]["frq"] + all_data_exp["cif"][4]["est"]["frq"] + all_data_exp["cif"][5]["est"]["frq"] ) / 5 comp_exp["cif"]["est"]["bay"] = ( all_data_exp["cif"][1]["est"]["bay"] + all_data_exp["cif"][2]["est"]["bay"] + all_data_exp["cif"][3]["est"]["bay"] + all_data_exp["cif"][4]["est"]["bay"] + all_data_exp["cif"][5]["est"]["bay"] ) / 5 #= # Energy means =# comp_ene = Dict( "mni" => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), "cif" => Dict( "100" => Dict("bay" => 0.0, "frq" => 0.0), "acc" => Dict("bay" => 0.0, "frq" => 0.0), "wat" => Dict("bay" => 0.0, "frq" => 0.0), "est" => Dict("bay" => 0.0, "frq" => 0.0), ), ) comp_ene["mni"]["100"]["frq"] = ( all_data_ene["mni"][1]["100"]["frq"] + all_data_ene["mni"][2]["100"]["frq"] + all_data_ene["mni"][3]["100"]["frq"] + all_data_ene["mni"][4]["100"]["frq"] + all_data_ene["mni"][5]["100"]["frq"] ) / 5 comp_ene["mni"]["100"]["bay"] = ( all_data_ene["mni"][1]["100"]["bay"] + all_data_ene["mni"][2]["100"]["bay"] + all_data_ene["mni"][3]["100"]["bay"] + all_data_ene["mni"][4]["100"]["bay"] + all_data_ene["mni"][5]["100"]["bay"] ) / 5 comp_ene["cif"]["100"]["frq"] = ( all_data_ene["cif"][1]["100"]["frq"] + all_data_ene["cif"][2]["100"]["frq"] + all_data_ene["cif"][3]["100"]["frq"] + all_data_ene["cif"][4]["100"]["frq"] + all_data_ene["cif"][5]["100"]["frq"] ) / 5 comp_ene["cif"]["100"]["bay"] = ( all_data_ene["cif"][1]["100"]["bay"] + all_data_ene["cif"][2]["100"]["bay"] + all_data_ene["cif"][3]["100"]["bay"] + all_data_ene["cif"][4]["100"]["bay"] + all_data_ene["cif"][5]["100"]["bay"] ) / 5 comp_ene["mni"]["acc"]["frq"] = ( all_data_ene["mni"][1]["acc"]["frq"] + all_data_ene["mni"][2]["acc"]["frq"] + all_data_ene["mni"][3]["acc"]["frq"] + all_data_ene["mni"][4]["acc"]["frq"] + all_data_ene["mni"][5]["acc"]["frq"] ) / 5 comp_ene["mni"]["acc"]["bay"] = ( all_data_ene["mni"][1]["acc"]["bay"] + all_data_ene["mni"][2]["acc"]["bay"] + all_data_ene["mni"][3]["acc"]["bay"] + all_data_ene["mni"][4]["acc"]["bay"] + all_data_ene["mni"][5]["acc"]["bay"] ) / 5 comp_ene["cif"]["acc"]["frq"] = ( all_data_ene["cif"][1]["acc"]["frq"] + all_data_ene["cif"][2]["acc"]["frq"] + all_data_ene["cif"][3]["acc"]["frq"] + all_data_ene["cif"][4]["acc"]["frq"] + all_data_ene["cif"][5]["acc"]["frq"] ) / 5 comp_ene["cif"]["acc"]["bay"] = ( all_data_ene["cif"][1]["acc"]["bay"] + all_data_ene["cif"][2]["acc"]["bay"] + all_data_ene["cif"][3]["acc"]["bay"] + all_data_ene["cif"][4]["acc"]["bay"] + all_data_ene["cif"][5]["acc"]["bay"] ) / 5 comp_ene["mni"]["wat"]["frq"] = ( all_data_ene["mni"][1]["wat"]["frq"] + all_data_ene["mni"][2]["wat"]["frq"] + all_data_ene["mni"][3]["wat"]["frq"] + all_data_ene["mni"][4]["wat"]["frq"] + all_data_ene["mni"][5]["wat"]["frq"] ) / 5 comp_ene["mni"]["wat"]["bay"] = ( all_data_ene["mni"][1]["wat"]["bay"] + all_data_ene["mni"][2]["wat"]["bay"] + all_data_ene["mni"][3]["wat"]["bay"] + all_data_ene["mni"][4]["wat"]["bay"] + all_data_ene["mni"][5]["wat"]["bay"] ) / 5 comp_ene["cif"]["wat"]["frq"] = ( all_data_ene["cif"][1]["wat"]["frq"] + all_data_ene["cif"][2]["wat"]["frq"] + all_data_ene["cif"][3]["wat"]["frq"] + all_data_ene["cif"][4]["wat"]["frq"] + all_data_ene["cif"][5]["wat"]["frq"] ) / 5 comp_ene["cif"]["wat"]["bay"] = ( all_data_ene["cif"][1]["wat"]["bay"] + all_data_ene["cif"][2]["wat"]["bay"] + all_data_ene["cif"][3]["wat"]["bay"] + all_data_ene["cif"][4]["wat"]["bay"] + all_data_ene["cif"][5]["wat"]["bay"] ) / 5 comp_ene["mni"]["est"]["frq"] = ( all_data_ene["mni"][1]["est"]["frq"] + all_data_ene["mni"][2]["est"]["frq"] + all_data_ene["mni"][3]["est"]["frq"] + all_data_ene["mni"][4]["est"]["frq"] + all_data_ene["mni"][5]["est"]["frq"] ) / 5 comp_ene["mni"]["est"]["bay"] = ( all_data_ene["mni"][1]["est"]["bay"] + all_data_ene["mni"][2]["est"]["bay"] + all_data_ene["mni"][3]["est"]["bay"] + all_data_ene["mni"][4]["est"]["bay"] + all_data_ene["mni"][5]["est"]["bay"] ) / 5 comp_ene["cif"]["est"]["frq"] = ( all_data_ene["cif"][1]["est"]["frq"] + all_data_ene["cif"][2]["est"]["frq"] + all_data_ene["cif"][3]["est"]["frq"] + all_data_ene["cif"][4]["est"]["frq"] + all_data_ene["cif"][5]["est"]["frq"] ) / 5 comp_ene["cif"]["est"]["bay"] = ( all_data_ene["cif"][1]["est"]["bay"] + all_data_ene["cif"][2]["est"]["bay"] + all_data_ene["cif"][3]["est"]["bay"] + all_data_ene["cif"][4]["est"]["bay"] + all_data_ene["cif"][5]["est"]["bay"] ) / 5 =# #= Accuracy =# for s = 1:5 @printf "MNIST Bayes accuracy size %i 100: %-.8f\n" s all_data_exp["mni"][s]["100"]["bay"] end for s = 1:5 @printf "MNIST Freq accuracy size %i 100: %-.8f\n" s all_data_exp["mni"][s]["100"]["frq"] end for s = 1:5 @printf "CIFAR Bayes accuracy size %i 100: %-.8f\n" s all_data_exp["cif"][s]["100"]["bay"] end for s = 1:5 @printf "CIFAR Freq accuracy size %i 100: %-.8f\n" s all_data_exp["cif"][s]["100"]["frq"] end for s = 1:5 @printf "MNIST Bayes accuracy size %i Est: %-.8f\n" s all_data_exp["mni"][s]["est"]["bay"] end for s = 1:5 @printf "MNIST Freq accuracy size %i Est: %-.8f\n" s all_data_exp["mni"][s]["est"]["frq"] end for s = 1:5 @printf "CIFAR Bayes accuracy size %i Est: %-.8f\n" s all_data_exp["cif"][s]["est"]["bay"] end for s = 1:5 @printf "CIFAR Freq accuracy size %i Est: %-.8f\n" s all_data_exp["cif"][s]["est"]["frq"] end for s = 1:5 @printf "MNIST Bayes accuracy size %i Wat: %-.8f\n" s all_data_exp["mni"][s]["wat"]["bay"] end for s = 1:5 @printf "MNIST Freq accuracy size %i Wat: %-.8f\n" s all_data_exp["mni"][s]["wat"]["frq"] end for s = 1:5 @printf "CIFAR Bayes accuracy size %i Wat: %-.8f\n" s all_data_exp["cif"][s]["wat"]["bay"] end for s = 1:5 @printf "CIFAR Freq accuracy size %i Wat: %-.8f\n" s all_data_exp["cif"][s]["wat"]["frq"] end for s = 1:5 @printf "MNIST Bayes accuracy size %i Acc: %-.8f\n" s all_data_exp["mni"][s]["acc"]["bay"] end for s = 1:5 @printf "MNIST Freq accuracy size %i Acc: %-.8f\n" s all_data_exp["mni"][s]["acc"]["frq"] end for s = 1:5 @printf "CIFAR Bayes accuracy size %i Acc: %-.8f\n" s all_data_exp["cif"][s]["acc"]["bay"] end for s = 1:5 @printf "CIFAR Freq accuracy size %i Acc: %-.8f\n" s all_data_exp["cif"][s]["acc"]["frq"] end #= Energy =# for s = 1:5 @printf "MNIST Bayes energy size %i 100: %-.8f\n" s all_data_ene["mni"][s]["100"]["bay"] end for s = 1:5 @printf "MNIST Freq energy size %i 100: %-.8f\n" s all_data_ene["mni"][s]["100"]["frq"] end for s = 1:5 @printf "CIFAR Bayes energy size %i 100: %-.8f\n" s all_data_ene["cif"][s]["100"]["bay"] end for s = 1:5 @printf "CIFAR Freq energy size %i 100: %-.8f\n" s all_data_ene["cif"][s]["100"]["frq"] end for s = 1:5 @printf "MNIST Bayes energy size %i Est: %-.8f\n" s all_data_ene["mni"][s]["est"]["bay"] end for s = 1:5 @printf "MNIST Freq energy size %i Est: %-.8f\n" s all_data_ene["mni"][s]["est"]["frq"] end for s = 1:5 @printf "CIFAR Bayes energy size %i Est: %-.8f\n" s all_data_ene["cif"][s]["est"]["bay"] end for s = 1:5 @printf "CIFAR Freq energy size %i Est: %-.8f\n" s all_data_ene["cif"][s]["est"]["frq"] end for s = 1:5 @printf "MNIST Bayes energy size %i Wat: %-.8f\n" s all_data_ene["mni"][s]["wat"]["bay"] end for s = 1:5 @printf "MNIST Freq energy size %i Wat: %-.8f\n" s all_data_ene["mni"][s]["wat"]["frq"] end for s = 1:5 @printf "CIFAR Bayes energy size %i Wat: %-.8f\n" s all_data_ene["cif"][s]["wat"]["bay"] end for s = 1:5 @printf "CIFAR Freq energy size %i Wat: %-.8f\n" s all_data_ene["cif"][s]["wat"]["frq"] end for s = 1:5 @printf "MNIST Bayes energy size %i Acc: %-.8f\n" s all_data_ene["mni"][s]["acc"]["bay"] end for s = 1:5 @printf "MNIST Freq energy size %i Acc: %-.8f\n" s all_data_ene["mni"][s]["acc"]["frq"] end for s = 1:5 @printf "CIFAR Bayes energy size %i Acc: %-.8f\n" s all_data_ene["cif"][s]["acc"]["bay"] end for s = 1:5 @printf "CIFAR Freq energy size %i Acc: %-.8f\n" s all_data_ene["cif"][s]["acc"]["frq"] end #= #= Efficiency =# for s = 1:5 @printf "MNIST Bayes efficiency size %i 100: %-.8f\n" s all_data_exp["mni"][s]["100"]["bay"]/all_data_ene["mni"][s]["100"]["bay"] end for s = 1:5 @printf "MNIST Freq efficiency size %i 100: %-.8f\n" s all_data_exp["mni"][s]["100"]["frq"]/all_data_ene["mni"][s]["100"]["frq"] end for s = 1:5 @printf "CIFAR Bayes efficiency size %i 100: %-.8f\n" s all_data_exp["cif"][s]["100"]["bay"]/all_data_ene["cif"][s]["100"]["bay"] end for s = 1:5 @printf "CIFAR Freq efficiency size %i 100: %-.8f\n" s all_data_exp["cif"][s]["100"]["frq"]/all_data_ene["cif"][s]["100"]["frq"] end for s = 1:5 @printf "MNIST Bayes efficiency size %i Est: %-.8f\n" s all_data_exp["mni"][s]["est"]["bay"]/all_data_ene["mni"][s]["est"]["bay"] end for s = 1:5 @printf "MNIST Freq efficiency size %i Est: %-.8f\n" s all_data_exp["mni"][s]["est"]["frq"]/all_data_ene["mni"][s]["est"]["frq"] end for s = 1:5 @printf "CIFAR Bayes efficiency size %i Est: %-.8f\n" s all_data_exp["cif"][s]["est"]["bay"]/all_data_ene["cif"][s]["est"]["bay"] end for s = 1:5 @printf "CIFAR Freq efficiency size %i Est: %-.8f\n" s all_data_exp["cif"][s]["est"]["frq"]/all_data_ene["cif"][s]["est"]["frq"] end for s = 1:5 @printf "MNIST Bayes efficiency size %i Wat: %-.8f\n" s all_data_exp["mni"][s]["wat"]["bay"]/all_data_ene["mni"][s]["wat"]["bay"] end for s = 1:5 @printf "MNIST Freq efficiency size %i Wat: %-.8f\n" s all_data_exp["mni"][s]["wat"]["frq"]/all_data_ene["mni"][s]["wat"]["frq"] end for s = 1:5 @printf "CIFAR Bayes efficiency size %i Wat: %-.8f\n" s all_data_exp["cif"][s]["wat"]["bay"]/all_data_ene["cif"][s]["wat"]["bay"] end for s = 1:5 @printf "CIFAR Freq efficiency size %i Wat: %-.8f\n" s all_data_exp["cif"][s]["wat"]["frq"]/all_data_ene["cif"][s]["wat"]["frq"] end for s = 1:5 @printf "MNIST Bayes efficiency size %i Acc: %-.8f\n" s all_data_exp["mni"][s]["acc"]["bay"]/all_data_ene["mni"][s]["acc"]["bay"] end for s = 1:5 @printf "MNIST Freq efficiency size %i Acc: %-.8f\n" s all_data_exp["mni"][s]["acc"]["frq"]/all_data_ene["mni"][s]["acc"]["frq"] end for s = 1:5 @printf "CIFAR Bayes efficiency size %i Acc: %-.8f\n" s all_data_exp["cif"][s]["acc"]["bay"]/all_data_ene["cif"][s]["acc"]["bay"] end for s = 1:5 @printf "CIFAR Freq efficiency size %i Acc: %-.8f\n" s all_data_exp["cif"][s]["acc"]["frq"]/all_data_ene["cif"][s]["acc"]["frq"] end #= Metric per experiment =# @printf "MNIST LeNet 100 Ratio: %-.8f\n" comp_exp["mni"]["100"]["frq"] / comp_ene["mni"]["100"]["frq"] @printf "MNIST Bayes 100 Ratio: %-.8f\n" comp_exp["mni"]["100"]["bay"] / comp_ene["mni"]["100"]["bay"] @printf "CIFAR LeNet 100 Ratio: %-.8f\n" comp_exp["cif"]["100"]["frq"] / comp_ene["cif"]["100"]["frq"] @printf "CIFAR Bayes 100 Ratio: %-.8f\n" comp_exp["cif"]["100"]["bay"] / comp_ene["cif"]["100"]["bay"] @printf "MNIST LeNet Est Ratio: %-.8f\n" comp_exp["mni"]["est"]["frq"] / comp_ene["mni"]["est"]["frq"] @printf "MNIST Bayes Est Ratio: %-.8f\n" comp_exp["mni"]["est"]["bay"] / comp_ene["mni"]["est"]["bay"] @printf "CIFAR LeNet Est Ratio: %-.8f\n" comp_exp["cif"]["est"]["frq"] / comp_ene["cif"]["est"]["frq"] @printf "CIFAR Bayes Est Ratio: %-.8f\n" comp_exp["cif"]["est"]["bay"] / comp_ene["cif"]["est"]["bay"] @printf "MNIST LeNet Wat Ratio: %-.8f\n" comp_exp["mni"]["wat"]["frq"] / comp_ene["mni"]["wat"]["frq"] @printf "MNIST Bayes Wat Ratio: %-.8f\n" comp_exp["mni"]["wat"]["bay"] / comp_ene["mni"]["wat"]["bay"] @printf "CIFAR LeNet Wat Ratio: %-.8f\n" comp_exp["cif"]["wat"]["frq"] / comp_ene["cif"]["wat"]["frq"] @printf "CIFAR Bayes Wat Ratio: %-.8f\n" comp_exp["cif"]["wat"]["bay"] / comp_ene["cif"]["wat"]["bay"] @printf "MNIST LeNet Acc Ratio: %-.8f\n" comp_exp["mni"]["acc"]["frq"] / comp_ene["mni"]["acc"]["frq"] @printf "MNIST Bayes Acc Ratio: %-.8f\n" comp_exp["mni"]["acc"]["bay"] / comp_ene["mni"]["acc"]["bay"] @printf "CIFAR LeNet Acc Ratio: %-.8f\n" comp_exp["cif"]["acc"]["frq"] / comp_ene["cif"]["acc"]["frq"] @printf "CIFAR Bayes Acc Ratio: %-.8f\n" comp_exp["cif"]["acc"]["bay"] / comp_ene["cif"]["acc"]["bay"] #= Final Metric =# mni_tot_frq_exp = ( comp_exp["mni"]["100"]["frq"] + comp_exp["mni"]["acc"]["frq"] + comp_exp["mni"]["wat"]["frq"] + comp_exp["mni"]["est"]["frq"] ) / 4 mni_tot_bay_exp = ( comp_exp["mni"]["100"]["bay"] + comp_exp["mni"]["acc"]["bay"] + comp_exp["mni"]["wat"]["bay"] + comp_exp["mni"]["est"]["bay"] ) / 4 cif_tot_frq_exp = ( comp_exp["cif"]["100"]["frq"] + comp_exp["cif"]["acc"]["frq"] + comp_exp["cif"]["wat"]["frq"] + comp_exp["cif"]["est"]["frq"] ) / 4 cif_tot_bay_exp = ( comp_exp["cif"]["100"]["bay"] + comp_exp["cif"]["acc"]["bay"] + comp_exp["cif"]["wat"]["bay"] + comp_exp["cif"]["est"]["bay"] ) / 4 mni_tot_frq_ene = ( comp_ene["mni"]["100"]["frq"] + comp_ene["mni"]["acc"]["frq"] + comp_ene["mni"]["wat"]["frq"] + comp_ene["mni"]["est"]["frq"] ) / 4 mni_tot_bay_ene = ( comp_ene["mni"]["100"]["bay"] + comp_ene["mni"]["acc"]["bay"] + comp_ene["mni"]["wat"]["bay"] + comp_ene["mni"]["est"]["bay"] ) / 4 cif_tot_frq_ene = ( comp_ene["cif"]["100"]["frq"] + comp_ene["cif"]["acc"]["frq"] + comp_ene["cif"]["wat"]["frq"] + comp_ene["cif"]["est"]["frq"] ) / 4 cif_tot_bay_ene = ( comp_ene["cif"]["100"]["bay"] + comp_ene["cif"]["acc"]["bay"] + comp_ene["cif"]["wat"]["bay"] + comp_ene["cif"]["est"]["bay"] ) / 4 @printf "LeNet-5 on MNIST Efficiency Metric: %-.8f\n" mni_tot_frq_exp/mni_tot_frq_ene @printf "LeNet-5 on CIFAR Efficiency Metric: %-.8f\n" cif_tot_frq_exp/cif_tot_frq_ene @printf "BCNN on MNIST Efficiency Metric: %-.8f\n" mni_tot_bay_exp/mni_tot_bay_ene @printf "BCNN on CIFAR Efficiency Metric: %-.8f\n" cif_tot_bay_exp/cif_tot_bay_ene =#