Commit b33d0d10 authored by Ruilong Li's avatar Ruilong Li
Browse files

small fix on doc

parent e813bcaa
...@@ -175,16 +175,20 @@ class OccupancyField(nn.Module): ...@@ -175,16 +175,20 @@ class OccupancyField(nn.Module):
step: int, step: int,
occ_thre: float = 1e-2, occ_thre: float = 1e-2,
ema_decay: float = 0.95, ema_decay: float = 0.95,
warmup_steps: int = 256,
n: int = 16, n: int = 16,
): ):
"""Update the field every n steps during training."""
if not self.training: if not self.training:
raise RuntimeError( raise RuntimeError(
"You should only call this function during training. Please call update() " "You should only call this function only during training. "
"directly if you want to update the field during inference." "Please call update() directly if you want to update the "
"field during inference."
) )
if step % n == 0 and self.training: if step % n == 0 and self.training:
self.update( self.update(
step=step, step=step,
occ_threshold=occ_thre, occ_threshold=occ_thre,
ema_decay=ema_decay, ema_decay=ema_decay,
warmup_steps=warmup_steps,
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment