// neural_net.sy — A simple neural network forward pass in Scyla.
// This is what Silkie will eventually run on.
// Aislinn McCubbins, April 2026

fn main() {
    println("=== Scyla Neural Network ===")

    // Input: batch of 4 samples, 3 features each
    let x = ones(4, 3)
    println("Input " + tensor_shape(x) + ":")
    println(x)

    // Layer 1: Linear(3 -> 4) + ReLU
    let w1 = rand_tensor(3, 4)
    let b1 = zeros(4, 4)
    let h1 = matmul(x, w1)
    let h1 = h1 + b1
    let h1 = relu(h1)
    println("Hidden layer " + tensor_shape(h1) + ":")
    println(h1)

    // Layer 2: Linear(4 -> 2) + Softmax
    let w2 = rand_tensor(4, 2)
    let h2 = matmul(h1, w2)
    let output = softmax(h2)
    println("Output " + tensor_shape(output) + ":")
    println(output)

    // Verify probabilities sum to 1 per row
    let total = tensor_sum(output)
    println("Sum of output (should be ~4.0 for 4 samples):")
    println(total)

    println("=== Forward pass complete! ===")
}
