Random Seed: 4529 Time Span: 0 to 10, Points: 1000 Learning Rate: 0.1 Weight Decay: 0.0001 Loss Function: def loss_fn(state_traj, t_span): theta = state_traj[:, :, 0] # Size: [batch_size, t_points] desired_theta = state_traj[:, :, 3] # Size: [batch_size, t_points] weights = weight_fn(t_span) # Initially Size: [t_points] # Reshape or expand weights to match theta dimensions weights = weights.view(-1, 1) # Now Size: [batch_size, t_points] # Calculate the weighted loss return torch.mean(weights * (theta - desired_theta) ** 2) Training Cases: [theta0, omega0, alpha0, desired_theta] [0.5235987901687622, 0.0, 0.0, 0.0] [-0.5235987901687622, 0.0, 0.0, 0.0] [2.094395160675049, 0.0, 0.0, 0.0] [-2.094395160675049, 0.0, 0.0, 0.0] [0.0, 1.0471975803375244, 0.0, 0.0] [0.0, -1.0471975803375244, 0.0, 0.0] [0.0, 6.2831854820251465, 0.0, 0.0] [0.0, -6.2831854820251465, 0.0, 0.0] [0.0, 0.0, 0.0, 6.2831854820251465] [0.0, 0.0, 0.0, -6.2831854820251465] [0.0, 0.0, 0.0, 1.5707963705062866] [0.0, 0.0, 0.0, -1.5707963705062866] [0.0, 0.0, 0.0, 1.0471975803375244] [0.0, 0.0, 0.0, -1.0471975803375244] [0.7853981852531433, 3.1415927410125732, 0.0, 0.0] [-0.7853981852531433, -3.1415927410125732, 0.0, 0.0] [1.5707963705062866, -3.1415927410125732, 0.0, 1.0471975803375244] [-1.5707963705062866, 3.1415927410125732, 0.0, -1.0471975803375244] [0.7853981852531433, 3.1415927410125732, 0.0, 6.2831854820251465] [-0.7853981852531433, -3.1415927410125732, 0.0, 6.2831854820251465] [1.5707963705062866, -3.1415927410125732, 0.0, 12.566370964050293] [-1.5707963705062866, 3.1415927410125732, 0.0, -12.566370964050293]