mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-20 06:35:36 +08:00
Ability to use vanilla pytorch instead of tcnn for Nerfacto (#1936)
* started a package to easily swap out tcnn for pytorch * trains with pytorch and not tcnn * cleaned up imports * making it easy to install on mac * removed/reverted files * merged main * reverted changes * updating config * starting to add nerfacto to tests * fixxing default value * fixed default implementation * defaults to torch if tcnn and not installed * update log * add comment * resolved pr comments * fix * update default --------- Co-authored-by: Ethan Weber <ethanweber@eecs-128-32-175-250.dhcp.berkeley.edu>
This commit is contained in:
1 parent
400ab5a313
commit
bb6925bac6
19 files changed
+295
-296
No files matched your search
@@ -77,9 +77,9 @@ def outer(
|
||||
|
||||
|
||||
def lossfun_outer(
|
||||
t: Float[Tensor, "*batch num_samples+1"],
|
||||
t: Float[Tensor, "*batch num_samples_1"],
|
||||
w: Float[Tensor, "*batch num_samples"],
|
||||
t_env: Float[Tensor, "*batch num_samples+1"],
|
||||
t_env: Float[Tensor, "*batch num_samples_1"],
|
||||
w_env: Float[Tensor, "*batch num_samples"],
|
||||
):
|
||||
"""
|
||||
|
||||
@@ -17,7 +17,7 @@ Collection of sampling strategies
|
||||
"""
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import Callable, List, Optional, Protocol, Tuple, Union
|
||||
from typing import Any, Callable, List, Optional, Protocol, Tuple, Union
|
||||
|
||||
import torch
|
||||
from jaxtyping import Float
|
||||
@@ -42,10 +42,10 @@ class Sampler(nn.Module):
|
||||
self.num_samples = num_samples
|
||||
|
||||
@abstractmethod
|
||||
def generate_ray_samples(self) -> RaySamples:
|
||||
def generate_ray_samples(self) -> Any:
|
||||
"""Generate Ray Samples"""
|
||||
|
||||
def forward(self, *args, **kwargs) -> RaySamples:
|
||||
def forward(self, *args, **kwargs) -> Any:
|
||||
"""Generate ray samples"""
|
||||
return self.generate_ray_samples(*args, **kwargs)
|
||||
|
||||
|
||||
Reference in new issue
Block a user