Created
June 9, 2019 06:07
-
-
Save shubham0204/f8ab0f8d66cfc1c633948cb7d461a8fc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
private fun batch ( x : Array<DoubleArray> , y : DoubleArray , batchSize : Int ) : List<List<Pair<DoubleArray,Double>>> { | |
val data = x.zip( y.toTypedArray() ) | |
return data.chunked( batchSize ) | |
} | |
private fun forwardPropogate( x : DoubleArray ) : Double { | |
return MathOps.dot( this.weights , x ) + bias | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment