Last active
May 1, 2018 19:52
-
-
Save hsed/92aba567134d45af27cc92e13b8f4eb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fwdProp (x: Vector<float>) (net : Network) : (NodesVectList * Network) = | |
let propNetwork (nvectLstAndLayers: NodesVectList * Network) (layer : Layer) : (NodesVectList * Network) = | |
let nvectLst, layerLst = nvectLstAndLayers | |
let newSVect = layer.wMatx.Transpose() * CreateVector.Dense((Array.concat [ [|1.0|] ; nvectLst.Head.xVect.ToArray() ])) | |
let newXVect = (newSVect.Map (Func<float, float> (getActFn layer.actFn))) | |
({xVect=newXVect ; sVect=newSVect} :: nvectLst , layer :: layerLst) //append to top | |
(List.fold propNetwork ([{xVect=x ; sVect=x}], []) net) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment