first commit

This commit is contained in:
2025-05-13 09:03:38 +08:00
commit b98753bfbb
121 changed files with 8665 additions and 0 deletions

21
modules/pose_encoder.py Normal file
View File

@@ -0,0 +1,21 @@
from torch import nn
import PytorchBoot.stereotype as stereotype
@stereotype.module("pose_encoder")
class PoseEncoder(nn.Module):
def __init__(self, config):
super(PoseEncoder, self).__init__()
self.config = config
pose_dim = config["pose_dim"]
out_dim = config["out_dim"]
self.act = nn.ReLU(True)
self.pose_encoder = nn.Sequential(
nn.Linear(pose_dim, out_dim),
self.act,
nn.Linear(out_dim, out_dim),
self.act,
)
def encode_pose(self, pose):
return self.pose_encoder(pose)