File size: 375 Bytes
45cf443 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import torch
from torch import nn
class MMAudioProjector(nn.Module):
def __init__(self, in_dim, out_dim):
super().__init__()
self.mlp = nn.Sequential(
nn.LayerNorm(in_dim),
nn.Linear(in_dim, out_dim),
nn.GELU(),
nn.Linear(out_dim, out_dim),
)
def forward(self, x):
return self.mlp(x)
|