import torch
import torch.nn as nn

class SimpleIKNet(nn.Module):
    def __init__(self, input_dim=3, output_dim=6):
        super().__init__()
        # Input: Target [x, y, z]
        # Output: [theta1, phi1, theta2, phi2, theta3, phi3]
        
        self.net = nn.Sequential(
            nn.Linear(input_dim, 128),
            nn.Tanh(), # Tanh 在物理回归问题中通常比 ReLU 更平滑
            nn.Linear(128, 256),
            nn.Tanh(),
            nn.Linear(256, 128),
            nn.Tanh(),
            nn.Linear(128, output_dim)
        )

    def forward(self, x):
        return self.net(x)