Skip to content

Commit

Permalink
Add metric to animation
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenvivek committed Sep 5, 2023
1 parent e94e1db commit 1f86009
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion diffdrr/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def make_fig(ground_truth):
)
itr = drr(rotations, translations)
_ = plot_drr(itr, axs=ax_opt)
ax_opt.set(xlabel="Moving DRR")
ax_opt.set(xlabel=f"Moving DRR (loss = {row['loss']:.3f})")
fig.savefig(f"{tmpdir}/{idx}.png")
plt.close(fig)
idxs.append(idx)
Expand Down
2 changes: 1 addition & 1 deletion notebooks/api/04_visualization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
" translations = torch.tensor(row[[\"bx\", \"by\", \"bz\"]].values).unsqueeze(0).to(device)\n",
" itr = drr(rotations, translations)\n",
" _ = plot_drr(itr, axs=ax_opt)\n",
" ax_opt.set(xlabel=\"Moving DRR\")\n",
" ax_opt.set(xlabel=f\"Moving DRR (loss = {row['loss']:.3f})\")\n",
" fig.savefig(f\"{tmpdir}/{idx}.png\")\n",
" plt.close(fig)\n",
" idxs.append(idx)\n",
Expand Down
50 changes: 24 additions & 26 deletions notebooks/tutorials/optimizers.ipynb

Large diffs are not rendered by default.

0 comments on commit 1f86009

Please sign in to comment.