mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 15:28:49 +08:00
added base class and methods; done logic for building graph
This commit is contained in:
1 parent
69ea3ae45e
commit
39346ccf40
5 files changed
+80
-40
No files matched your search
@@ -5,9 +5,10 @@ from typing import Optional
|
||||
|
||||
from torch import nn
|
||||
from torchtyping import TensorType
|
||||
from mattport.nerf.modules.module import Module
|
||||
|
||||
|
||||
class MLP(nn.Module):
|
||||
class MLP(Module):
|
||||
"""Multilayer perceptron"""
|
||||
|
||||
def __init__(
|
||||
@@ -54,14 +55,6 @@ class MLP(nn.Module):
|
||||
|
||||
self.net = nn.Sequential(*layers)
|
||||
|
||||
def set_in_dim(self, in_dim: int) -> None:
|
||||
"""TODO: create base module class from which this extends"""
|
||||
self.in_dim = in_dim
|
||||
|
||||
def get_out_dim(self) -> int:
|
||||
"""TODO: create base module class from which this extends"""
|
||||
return self.out_dim
|
||||
|
||||
def forward(self, in_tensor: TensorType[..., "in_dim"]) -> TensorType[..., "out_dim"]:
|
||||
"""Process input with a multilayer perceptron.
|
||||
|
||||
|
||||
Reference in new issue
Block a user