Tensor forward(Tensor x) { // Standard Linear Transformation: xW + b Tensor out = x.matmul(weights) + bias; // Use GELU instead of ReLU to prevent "Dead Neurons" return useGelu ? out.gelu() : out; }