mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 18:44:21 +08:00
update render heads
This commit is contained in:
parent
5ef9b41ab1
commit
4e70568510
@ -8,19 +8,17 @@ from torch import nn
|
||||
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):
|
||||
"""Base Render head"""
|
||||
|
||||
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__()
|
||||
layers = [nn.Linear(in_dim, out_dim)]
|
||||
if activation:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user