Skip to content

Instantly share code, notes, and snippets.

View marcoheisig's full-sized avatar

Marco Heisig marcoheisig

  • FAU Erlangen-Nürnberg
  • Germany
View GitHub Profile
@no-defun-allowed
no-defun-allowed / nn3.lisp
Created April 19, 2019 02:21
A half-baked neural network library using Petalisp.
(ql:quickload :petalisp.examples)
(use-package '(:petalisp :petalisp.examples.linear-algebra))
;; we use this internal function in our hack over transpose and matmul.
(import 'petalisp.examples.linear-algebra::coerce-to-matrix)
(declaim (optimize (speed 3) (safety 1) (debug 3)))
;; i use these modified function definitions to produce the ranges
;; [0, n - 1] instead of [1, n], which makes handling them aside already
;; computed arrays much easier.
(defun transpose (x)