Skip to content

Commit 33dae98

Browse files
committed
Refactor colmap train script
1 parent 5bd22fd commit 33dae98

4 files changed

Lines changed: 200 additions & 268 deletions

File tree

‎scripts/logo_splat.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import logging
2020
import time
2121
from pathlib import Path
22-
from typing import cast
2322

2423
import dm_pix
2524
import imageio.v3 as iio
@@ -232,8 +231,7 @@ def step(
232231
) -> tuple[dict[str, jax.Array], optax.OptState, jax.Array]:
233232
loss, grads = jax.value_and_grad(loss_fn)(p)
234233
updates, opt_state = opt.update(grads, opt_state, p)
235-
# apply_updates is typed as the broad optax ArrayTree; the params stay a dict.
236-
return (cast("dict[str, jax.Array]", optax.apply_updates(p, updates)), opt_state, loss)
234+
return (optax.apply_updates(p, updates), opt_state, loss)
237235

238236
render_at = set(STRIP_STEPS) | set(candidate_steps())
239237
frames = {} # step -> uint8 HxWx3

0 commit comments

Comments
 (0)