import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader, random_split
import numpy as np
import matplotlib.pyplot as plt
from typing import Tuple, List, Optional, Union, Dict
import os
# ==========================================
# Global Configuration & Type Definitions
# ==========================================
# Set random seed for reproducibility
torch.manual_seed(42)
np.random.seed(42)
# Set environment variable to prevent OpenMP runtime conflict
os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'
# Type aliases
ComplexTensor = torch.Tensor # Expecting dtype=torch.complex64
RealTensor = torch.Tensor # Expecting dtype=torch.float32
class MSTAR_HRRP_Dataset