   ([shape {:keys [learn-rate normaliser-factor] :as options}]
     (when-not (coll? shape)
       (error "normaliser layer constructor requires a shape vector"))
-    (let [output (m/new-array :vectorz shape)
-          input-gradient (m/new-array :vectorz  shape)
-          mean (m/new-array :vectorz shape)
-          sd (m/new-array :vectorz shape)
-          acc-ss (m/new-array :vectorz shape)
-          acc-mean (m/new-array :vectorz shape)
-          tmp (m/new-array :vectorz shape)
+    (let [output (util/empty-array shape)
+          input-gradient (util/empty-array shape)
+          mean (util/empty-array shape)
+          sd (util/empty-array shape)
+          acc-ss (util/empty-array shape)
+          acc-mean (util/empty-array shape)
+          tmp (util/empty-array shape)
           ]
       (m/fill! sd 1.0)
       (m/fill! acc-ss 1.0)

    (when-not (coll? shape)
      (error "logistic layer constructor requires a shape vector"))
    (cortex.impl.layers.Logistic.
      (m/ensure-mutable (m/new-array :vectorz shape))
      (m/ensure-mutable (m/new-array :vectorz shape)))))

(defn dropout
  "Creates a dropout module of the given shape.

    (when-not (coll? shape)
      (error "relu layer constructor requires a shape vector"))
    (cortex.impl.layers.RectifiedLinear.
        (util/empty-array shape)
        (util/empty-array shape)
        (util/empty-array shape)
        negval)))

(defn linear
