mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 14:28:41 +08:00
update render heads
This commit is contained in:
1 parent
5ef9b41ab1
commit
4e70568510
1 file changed
+7
-9
@@ -8,19 +8,17 @@ from torch import nn
|
|||||||
from torchtyping import TensorType
|
from torchtyping import TensorType
|
||||||
|
|
||||||
|
|
||||||
class RenderHeadKeys(Enum):
|
|
||||||
"""Keys for model outputs"""
|
|
||||||
|
|
||||||
DENSITY = "density"
|
|
||||||
DISTS = "dists"
|
|
||||||
RGB = "rgb"
|
|
||||||
SH_RGB = "sh_rgb"
|
|
||||||
|
|
||||||
|
|
||||||
class RenderHead(nn.Module):
|
class RenderHead(nn.Module):
|
||||||
"""Base Render head"""
|
"""Base Render head"""
|
||||||
|
|
||||||
def __init__(self, in_dim: int, out_dim: int, activation: Optional[nn.Module]) -> None:
|
def __init__(self, in_dim: int, out_dim: int, activation: Optional[nn.Module]) -> None:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Args:
|
||||||
|
in_dim (int): input dimension
|
||||||
|
out_dim (int): output dimension for renderer
|
||||||
|
activation (Optional[nn.Module]): output head activation
|
||||||
|
"""
|
||||||
super().__init__()
|
super().__init__()
|
||||||
layers = [nn.Linear(in_dim, out_dim)]
|
layers = [nn.Linear(in_dim, out_dim)]
|
||||||
if activation:
|
if activation:
|
||||||
|
|||||||
Reference in new issue
Block a user