feat: add vision transfer backbones and IMF variants

This commit is contained in:
Logic
2026-04-09 14:02:24 +08:00
parent d51b3ecafa
commit ff7c9c1f2a
58 changed files with 2788 additions and 26 deletions
+17
View File
@@ -0,0 +1,17 @@
from __future__ import annotations
import torch
from torch import nn
class LinearConditionProjector(nn.Module):
"""Projects per-step visual+state conditioning to the head conditioning width."""
def __init__(self, input_dim: int, output_dim: int, bias: bool = True):
super().__init__()
self.input_dim = int(input_dim)
self.output_dim = int(output_dim)
self.linear = nn.Linear(self.input_dim, self.output_dim, bias=bias)
def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.linear(x)