hmatrix-backprop 0.1.2.5 → 0.1.3.0
raw patch · 3 files changed
+26/−10 lines, 3 filesdep ~hmatrix-vector-sized
Dependency ranges changed: hmatrix-vector-sized
Files
- CHANGELOG.md +11/−0
- hmatrix-backprop.cabal +4/−3
- src/Numeric/LinearAlgebra/Static/Backprop.hs +11/−7
CHANGELOG.md view
@@ -1,6 +1,17 @@ Changelog ========= +Version 0.1.3.0+---------------++*August 18, 2019*++<https://github.com/mstksg/hmatrix-backprop/releases/tag/v0.1.3.0>++* Fix for compatibility with *hmatrix-vector-sized-0.1.2.0*. However, this+ is potentially a breaking change because `vector`, `fromRows`, and+ `fromColumns` now all require extra `KnownNat` constraints.+ Version 0.1.2.5 ---------------
hmatrix-backprop.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.0.+-- This file has been generated from package.yaml by hpack version 0.31.2. -- -- see: https://github.com/sol/hpack ----- hash: d0f8da9fa8ff7bca8240eee0c23c2a5ffae1193ee73671c04e3f41000bf3fbe3+-- hash: 22374260be26db095f2d1edfc918fc42711f7704ab6d898e09e9f194cad3ddc2 name: hmatrix-backprop-version: 0.1.2.5+version: 0.1.3.0 synopsis: hmatrix operations lifted for backprop description: hmatrix operations lifted for backprop, along with orphan instances. .@@ -24,6 +24,7 @@ copyright: (c) Justin Le 2018 license: BSD3 license-file: LICENSE+tested-with: GHC >= 8.0 build-type: Simple extra-source-files: README.md
src/Numeric/LinearAlgebra/Static/Backprop.hs view
@@ -325,7 +325,7 @@ -- | Potentially extremely bad for anything but short lists!!! vector- :: forall n s. Reifies s W+ :: forall n s. (KnownNat n, Reifies s W) => SV.Vector n (BVar s H.ℝ) -> BVar s (H.R n) vector = BE.isoVar afSV@@ -1112,28 +1112,32 @@ :: forall m n s. (KnownNat m, KnownNat n, Reifies s W) => BVar s (H.L m n) -> SV.Vector m (BVar s (H.R n))-toRows = runABP . sequenceVar . isoVar (coerce H.lRows) (coerce H.rowsL)+toRows = runABP . sequenceVar+ . isoVar (coerce (H.lRows @m)) (coerce H.rowsL) {-# INLINE toRows #-} toColumns :: forall m n s. (KnownNat m, KnownNat n, Reifies s W) => BVar s (H.L m n) -> SV.Vector n (BVar s (H.R m))-toColumns = runABP . sequenceVar . isoVar (coerce H.lCols) (coerce H.colsL)+toColumns = runABP . sequenceVar+ . isoVar (coerce (H.lCols @_ @n)) (coerce H.colsL) {-# INLINE toColumns #-} fromRows- :: forall m n s. (KnownNat m, Reifies s W)+ :: forall m n s. (KnownNat m, KnownNat n, Reifies s W) => SV.Vector m (BVar s (H.R n)) -> BVar s (H.L m n)-fromRows = isoVar (coerce H.rowsL) (coerce H.lRows) . collectVar . ABP+fromRows = isoVar (coerce H.rowsL) (coerce (H.lRows @m))+ . collectVar . ABP {-# INLINE fromRows #-} fromColumns- :: forall m n s. (KnownNat n, Reifies s W)+ :: forall m n s. (KnownNat n, KnownNat m, Reifies s W) => SV.Vector n (BVar s (H.R m)) -> BVar s (H.L m n)-fromColumns = isoVar (coerce H.colsL) (coerce H.lCols) . collectVar . ABP+fromColumns = isoVar (coerce H.colsL) (coerce (H.lCols @_ @n))+ . collectVar . ABP {-# INLINE fromColumns #-} konst