     [cortex.nn.core :as core]
     [cortex.nn.layers :as layers]))
 
-(mat/set-current-implementation #?(:clj :vectorz :cljs :thing-ndarray))
+(m/set-current-implementation #?(:clj :vectorz :cljs :thing-ndarray))
 
 ; a	b	| a XOR b
 ; 1	1	     0

(ns cortex.nn.network-test
  (:require
    [cortex.nn.core :refer [calc output forward backward input-gradient parameters gradient parameter-count]]
    #?(:cljs
        [cljs.test :refer-macros [deftest is are testing]]
        :clj
        [clojure.test :refer [deftest is are testing]])
    [cortex.optimise :as opt]
    [clojure.core.matrix :as mat]
    [clojure.core.matrix.random :as randm]
    #?(:cljs [thi.ng.ndarray.core :as nd])
    [cortex.util :as util]

  "Define a random dataset and create the labels from some fixed parameters so we know exactly
  what the linear model should learn."
  []
  (let [x-data (into [] (m/rows (randm/sample-uniform [100 2])))
        y-data (into [] (map vector (m/array (m/transpose (m/add (m/mmul [0.1 0.2] (m/transpose x-data)) 0.3)))))
        model (layers/linear-layer 2 1)
        loss (opt/mse-loss)
        optimizer (opt/sgd-optimiser 0.01 0.9)
