mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-30 12:59:40 +08:00
Use tensordataclasses (#85)
+ Convert Frustum and RayBundle into TensorDataclasses. + Support TensorDataclass fields in TensorDataclasses + Support non batched types in TensorDataclass (The are iignored)
This commit is contained in:
1 parent
44e2d7494e
commit
59957fa202
9 files changed
+138
-101
No files matched your search
@@ -143,8 +143,8 @@ class Graph(AbstractGraph):
|
||||
return outputs
|
||||
|
||||
# during training, keep only the rays that intersect the scene. discard the rest
|
||||
valid_mask = intersected_ray_bundle.valid_mask
|
||||
masked_intersected_ray_bundle = intersected_ray_bundle.get_masked_ray_bundle(valid_mask)
|
||||
valid_mask = intersected_ray_bundle.valid_mask[..., 0]
|
||||
masked_intersected_ray_bundle = intersected_ray_bundle[valid_mask]
|
||||
masked_batch = get_masked_dict(batch, valid_mask) # NOTE(ethan): this is really slow if on CPU!
|
||||
outputs = self.get_outputs(masked_intersected_ray_bundle)
|
||||
loss_dict = self.get_loss_dict(outputs=outputs, batch=masked_batch)
|
||||
|
||||
Reference in new issue
Block a user