())] loss = loss_fn(imle_y_tensor, true_y) if t % 10: print(f"Iteration: {t}\tLoss: {loss.item():.2f}") optimizer.zero_grad() loss.backward() optimizer.step() def init_paths(): nonlocal evolving_paths_lst plt.clf() sns.set_theme() ax = sns.heatmap(evolving_paths_lst...
lengthscale = model.kernel.base_kernel.lengthscale.squeeze(0).detach().cpu().numpy() print(f"Epoch: {e}, loss: {loss.item():.3f}, lengthscale: {lengthscale[0]:.3f}, noise: {model.likelihood.noise.item():.3f}") # print(f"Loss: {loss.item():.3f}, lengthscale: {lengthscale}...
Y_sched_train = solver(mu_pred_train.double(), sig_pred_train.double()) weights2 = task_loss_no_mean( Y_sched_train.float(), Y_train_, params).cuda() model.set_sig(X_train_, Y_train_)returnmodel, weights2 开发者ID:locuslab,项目名称:e2e-model-learning,代码行数:26,代码来源:nets...