MicroGPT.ts - a conversion of Karpathy's MicroGPT to Typescript
    Preparing search index...

    Function linear

    • Linear (fully-connected) layer: multiply weight matrix w by input vector x.

      Parameters

      • x: Value[]

        Input vector of length nin.

      • w: Matrix

        Weight matrix of shape [nout][nin].

      Returns Value[]

      Output vector of length nout.