mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-25 10:29:51 +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
@@ -154,10 +154,9 @@ def test_tensor_hash_encoder():
|
||||
)
|
||||
assert encoder.get_out_dim() == out_dim
|
||||
|
||||
in_tensor = torch.zeros((10, 3))
|
||||
in_tensor[..., 1] = 1
|
||||
encoded = encoder(in_tensor)
|
||||
assert encoded.shape == (10, out_dim)
|
||||
in_tensor = torch.rand((10, 3))
|
||||
encoded_torch = encoder(in_tensor)
|
||||
assert encoded_torch.shape == (10, out_dim)
|
||||
|
||||
encoder = encodings.HashEncoding(
|
||||
num_levels=num_levels,
|
||||
@@ -165,10 +164,8 @@ def test_tensor_hash_encoder():
|
||||
log2_hashmap_size=5,
|
||||
implementation="tcnn",
|
||||
)
|
||||
in_tensor = torch.zeros((10, 3))
|
||||
in_tensor[..., 1] = 1
|
||||
encoded = encoder(in_tensor)
|
||||
assert encoded.shape == (10, out_dim)
|
||||
encoded_tcnn = encoder(in_tensor).float().cpu()
|
||||
assert encoded_tcnn.shape == (10, out_dim)
|
||||
|
||||
|
||||
def test_kplane_encoder():
|
||||
|
||||
Reference in new issue
Block a user