mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-15 20:33:59 +08:00
Restructure into field modules
This commit is contained in:
1 parent
28a66dac72
commit
5e24cbf6fe
13 files changed
+21
-23
No files matched your search
@@ -3,7 +3,7 @@ Encoding Tests
|
||||
"""
|
||||
import pytest
|
||||
import torch
|
||||
from mattport.nerf.modules import encoding
|
||||
from mattport.nerf.field_modules import encoding
|
||||
|
||||
|
||||
def test_scaling_and_offset():
|
||||
+1
-1
@@ -5,7 +5,7 @@ import pytest
|
||||
import torch
|
||||
from torch import nn
|
||||
|
||||
from mattport.nerf.modules import render_heads
|
||||
from mattport.nerf.field_modules import render_heads
|
||||
|
||||
|
||||
def test_render_head():
|
||||
@@ -1,5 +1,7 @@
|
||||
"""
|
||||
Tests of graph construction
|
||||
"""
|
||||
import numpy as np
|
||||
import pytest
|
||||
from hydra import compose, initialize
|
||||
from omegaconf import open_dict
|
||||
|
||||
@@ -28,7 +30,7 @@ def instantiate_graph(config_name: str) -> Graph:
|
||||
|
||||
|
||||
def test_graph_init():
|
||||
"""test modules dictionary is instantiated properly"""
|
||||
"""test field modules dictionary is instantiated properly"""
|
||||
test_graph, _ = instantiate_graph("test_basic_graph")
|
||||
assert test_graph.modules is not None
|
||||
assert type(test_graph.modules["encoder_0"]).__name__ == "ScalingAndOffset"
|
||||
@@ -37,7 +39,7 @@ def test_graph_init():
|
||||
|
||||
|
||||
def test_input_dimension():
|
||||
"""test module input dimension calculation"""
|
||||
"""test field module input dimension calculation"""
|
||||
test_graph, _ = instantiate_graph("test_repeat_graph")
|
||||
assert test_graph.modules["mlp_0"].in_dim == 16
|
||||
assert test_graph.modules["mlp_1"].in_dim == 1
|
||||
|
||||
@@ -4,7 +4,7 @@ Test ray generation.
|
||||
import torch
|
||||
|
||||
from mattport.nerf.dataset.blender_dataset import load_blender_data
|
||||
from mattport.nerf.modules.ray_generator import RayGenerator
|
||||
from mattport.nerf.field_modules.ray_generator import RayGenerator
|
||||
from mattport.structures.rays import RayBundle
|
||||
from mattport.utils.io import get_absolute_path
|
||||
|
||||
|
||||
Reference in new issue
Block a user