Skip to content

Commit 1f86009

Browse files
committed
Add metric to animation
1 parent e94e1db commit 1f86009

File tree

3 files changed

+26
-28
lines changed

3 files changed

+26
-28
lines changed

diffdrr/visualization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def make_fig(ground_truth):
107107
)
108108
itr = drr(rotations, translations)
109109
_ = plot_drr(itr, axs=ax_opt)
110-
ax_opt.set(xlabel="Moving DRR")
110+
ax_opt.set(xlabel=f"Moving DRR (loss = {row['loss']:.3f})")
111111
fig.savefig(f"{tmpdir}/{idx}.png")
112112
plt.close(fig)
113113
idxs.append(idx)

notebooks/api/04_visualization.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
" translations = torch.tensor(row[[\"bx\", \"by\", \"bz\"]].values).unsqueeze(0).to(device)\n",
155155
" itr = drr(rotations, translations)\n",
156156
" _ = plot_drr(itr, axs=ax_opt)\n",
157-
" ax_opt.set(xlabel=\"Moving DRR\")\n",
157+
" ax_opt.set(xlabel=f\"Moving DRR (loss = {row['loss']:.3f})\")\n",
158158
" fig.savefig(f\"{tmpdir}/{idx}.png\")\n",
159159
" plt.close(fig)\n",
160160
" idxs.append(idx)\n",

notebooks/tutorials/optimizers.ipynb

Lines changed: 24 additions & 26 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)