def indexed_loss_fun(w, i_iter): rs = RandomState((seed, i, i_iter)) idxs = rs.randint(N_train, size=batch_size) return nllfun(w, train_images[idxs], train_labels[idxs])
def indexed_loss_fun(w, i_iter): rs = RandomState((seed, i, i_iter)) idxs = rs.randint(N_train, size=batch_size) nll = nllfun(w, train_images[idxs], train_labels[idxs]) * N_train nlp = neg_log_prior(w) return nll + nlp
def indexed_loss_fun(w, i_iter): rs = RandomState((seed, i_iter)) idxs = rs.randint(N_train, size=batch_size) nll = nllfun(w, train_images[idxs], train_labels[idxs]) * N_train #nlp = neg_log_prior(w) return nll # + nlp
def indexed_loss_fun(w, i_iter): rs = RandomState((seed, i, i_iter)) idxs = rs.randint(N_train, size=batch_size) nll = nllfun(w, train_inputs[idxs], train_targets[idxs]) * N_train nlp = neg_log_prior(w) return nll + nlp
def indexed_loss_fun(w, i_iter): rs = RandomState((seed, i, i_iter)) idxs = rs.randint(N_train, size=batch_size) nll = nllfun(w, train_inputs[idxs], train_targets[idxs]) * N_train return nll
def indexed_loss_fun(w, i_iter): rs = RandomState((seed, i, i_iter)) idxs = rs.randint(N_train, size=batch_size) return nllfun(w, train_images[idxs], train_labels[idxs]) * N_train