-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_test.py
More file actions
34 lines (27 loc) · 976 Bytes
/
simple_test.py
File metadata and controls
34 lines (27 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
import sys
import torch
import traceback
def main():
print("=== Simple HYB Test ===")
try:
from scene import GaussianModel
from utils.loss_utils import loss_func
# Test 1: Create GaussianModel
print("Creating GaussianModel with HYB...")
gaussians = GaussianModel(sh_degree=3, uw_flag="HYB")
print("✓ GaussianModel created successfully")
# Test 2: Check device
device = "cuda" if torch.cuda.is_available() else "cpu"
print(f"Using device: {device}")
# Test 3: Simple tensor operations
test_tensor = torch.tensor([[0.15, 0.20, 0.25]], device=device)
print(f"✓ Test tensor created: {test_tensor}")
print("All tests passed!")
return 0
except Exception as e:
print(f"Error: {e}")
traceback.print_exc()
return 1
if __name__ == "__main__":
sys.exit(main())