mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 14:58:55 +08:00
Speedup eval and training with better data management (#492)
move to tensors to gpu earlier
This commit is contained in:
1 parent
96e1f2a698
commit
a43776d76d
5 files changed
+13
-12
No files matched your search
@@ -113,7 +113,7 @@ class RaySamples(TensorDataclass):
|
||||
# mip-nerf version of transmittance calculation:
|
||||
transmittance = torch.cumsum(delta_density[..., :-1, :], dim=-2)
|
||||
transmittance = torch.cat(
|
||||
[torch.zeros((*transmittance.shape[:1], 1, 1)).to(densities.device), transmittance], dim=-2
|
||||
[torch.zeros((*transmittance.shape[:1], 1, 1), device=densities.device), transmittance], dim=-2
|
||||
)
|
||||
transmittance = torch.exp(-transmittance) # [..., "num_samples"]
|
||||
|
||||
|
||||
Reference in new issue
Block a user