Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLP for embedding camera matrix #17

Open
rfeinman opened this issue Sep 27, 2023 · 2 comments
Open

MLP for embedding camera matrix #17

rfeinman opened this issue Sep 27, 2023 · 2 comments

Comments

@rfeinman
Copy link

Hi @seasonSH, could you provide some insight about the architecture of the 2-layer MLP for the camera matrix embedding? I'm guessing that it looks something like the below code, but if you could please correct me that would be great.

import torch
import torch.nn as nn

# 2-layer MLP
camera_embedding = nn.Sequential(
    nn.Linear(4*4, 512), 
    nn.SiLU(),
    nn.Linear(512, time_embed_dim),
    nn.LayerNorm(time_embed_dim)
)

# embed the 4x4 camera matrix
camera_embed = camera_embedding(camera)

# add result to time embedding
time_embed = time_embed + camera_embed
@yashkant
Copy link

+1 for this question!

@seasonSH
Copy link
Collaborator

It has exactly the same architecture as timestep embedding MLP except the input channels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants