 
 ;; default gradient function assumes zero parameters
 (extend-protocol cp/PGradient
-  #?(:clj Object :cljs js/object)
+  #?(:clj Object :cljs object)
     (gradient 
       ([m]
         EMPTY-VECTOR)))
 
 ;; default parameter count implementation is to... err... count the parameters. duh!
 (extend-protocol cp/PParameterCount
-  #?(:clj Object :cljs js/object)
+  #?(:clj Object :cljs object)
     (parameter-count 
       ([m]
         (m/ecount (cp/parameters m)))))
 
 ;; Default loss gradient function returns :loss-gradient-fn (may be nil)
 (extend-protocol cp/PLossGradientFunction
-  #?(:clj Object :cljs js/object)
+  #?(:clj Object :cljs object)
     (loss-gradient-fn 
       ([m]
         (:loss-gradient-fn m))))


;; default to assuming zero parameters
(extend-protocol cp/PParameters
  #?(:clj Object :cljs js/object)
  (parameters 
      ([m]
        ;; default to assuming zero parameters

;; 3. Compute outpout gradient
;; 4. Run backward pass
(extend-protocol cp/PTraining
  #?(:clj Object :cljs object)
    (train 
      ([m input target]
        (let [m (cp/forward m input)
