mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-02 22:08:41 +08:00
Fix linting issues
This commit is contained in:
1 parent
10761460de
commit
32af0082c7
4 files changed
+6
-10
No files matched your search
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
Field output tests
|
||||
"""
|
||||
import pytest
|
||||
import torch
|
||||
from torch import nn
|
||||
|
||||
@@ -19,7 +18,7 @@ def test_field_output():
|
||||
assert render_head.get_out_dim() == out_dim
|
||||
|
||||
x = torch.ones((9, in_dim))
|
||||
y = render_head(x)
|
||||
render_head(x)
|
||||
|
||||
|
||||
def test_density_output():
|
||||
@@ -29,7 +28,7 @@ def test_density_output():
|
||||
assert density_head.get_out_dim() == 1
|
||||
|
||||
x = torch.ones((9, in_dim))
|
||||
y = density_head(x)
|
||||
density_head(x)
|
||||
|
||||
|
||||
def test_rgb_output():
|
||||
@@ -39,4 +38,4 @@ def test_rgb_output():
|
||||
assert rgb_head.get_out_dim() == 3
|
||||
|
||||
x = torch.ones((9, in_dim))
|
||||
y = rgb_head(x)
|
||||
rgb_head(x)
|
||||
@@ -1,12 +1,9 @@
|
||||
"""
|
||||
Test samplers
|
||||
"""
|
||||
from random import uniform
|
||||
import pytest
|
||||
import torch
|
||||
from mattport.nerf.sampler import PDFSampler, UniformSampler
|
||||
|
||||
from mattport.structures.cameras import Rays
|
||||
from mattport.structures.rays import RayBundle
|
||||
|
||||
|
||||
@@ -45,7 +42,7 @@ def test_pdf_sampler():
|
||||
|
||||
# Just check that it doesn't crash. Need to add some actual tests.
|
||||
pdf_sampler = PDFSampler(num_samples)
|
||||
ray_samples = pdf_sampler(ray_bundle, coarse_ray_samples, density, num_samples)
|
||||
pdf_sampler(ray_bundle, coarse_ray_samples, density, num_samples)
|
||||
|
||||
# TODO Tancik: Add more precise tests
|
||||
|
||||
|
||||
Reference in new issue
Block a user