diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-11-14 19:27:06 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-11-14 19:27:06 +0100 |
commit | bb84f6930702a02ba982795e2bb95a64d61f672b (patch) | |
tree | 910b2a119f9758115d1b59e45d558fb983a9286b /src/Example.hs | |
parent | 02db8c1929a25dda64e6cee7b7343833ee698f34 (diff) |
Benchmark GMM
Diffstat (limited to 'src/Example.hs')
-rw-r--r-- | src/Example.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Example.hs b/src/Example.hs index a08724b..390031e 100644 --- a/src/Example.hs +++ b/src/Example.hs @@ -19,6 +19,7 @@ import Simplify import Debug.Trace import Example.Format +import Example.Types -- ppExpr senv5 $ simplifyN 20 $ let d = descr5 SMerge SMerge in freezeRet d (drev d ex5) (EConst ext STF32 1.0) @@ -110,8 +111,6 @@ ex6 = fromNamed $ lambda #x $ lambda #n $ body $ let_ #b (build1 #n (#_ :-> let_ #c (idx0 #a) $ #c * #c)) $ #b ! pair nil 3 -type R = TScal TF64 - senv7 :: SList STy [R, TPair (TPair (TPair TNil (TPair R R)) (TPair R R)) (TPair R R)] senv7 = knownEnv @@ -150,9 +149,6 @@ ex7 = fromNamed $ lambda #pars123 $ lambda #input $ body $ let_ #inp #input $ layer (STPair (STPair (STPair STNil tpair) tpair) tpair) -type TVec = TArr (S Z) -type TMat = TArr (S (S Z)) - neural :: Ex [TVec R, TVec R, TPair (TMat R) (TVec R), TPair (TMat R) (TVec R)] R neural = fromNamed $ lambda #layer1 $ lambda #layer2 $ lambda #layer3 $ lambda #input $ body $ let layer = lambda @(TMat R) #wei $ lambda @(TVec R) #bias $ lambda @(TVec R) #x $ body $ |