Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sf3d/models/camera.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dataclasses import dataclass, field
from typing import List
from typing import List, Dict, Any

import torch
import torch.nn as nn
Expand All @@ -19,7 +19,7 @@ class Config(BaseModule.Config):
def configure(self) -> None:
self.linear = nn.Linear(self.cfg.in_channels, self.cfg.out_channels)

def forward(self, **kwargs):
def forward(self, **kwargs: Dict[str, torch.Tensor]) -> torch.Tensor:
cond_tensors = []
for cond_name in self.cfg.conditions:
assert cond_name in kwargs
Expand All @@ -30,3 +30,4 @@ def forward(self, **kwargs):
assert cond_tensor.shape[-1] == self.cfg.in_channels
embedding = self.linear(cond_tensor)
return embedding