Skip to content

Instantly share code, notes, and snippets.

@shubham0204
Created June 9, 2019 06:07
Show Gist options
  • Save shubham0204/f8ab0f8d66cfc1c633948cb7d461a8fc to your computer and use it in GitHub Desktop.
Save shubham0204/f8ab0f8d66cfc1c633948cb7d461a8fc to your computer and use it in GitHub Desktop.
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