public static INDArray [ ] arraysFromBase64 ( String base64 ) throws IOException { String [ ] base64Arr = base64 . split ( "\t" ) ; INDArray [ ] ret = new INDArray [ base64Arr . length ] ; for ( int i = 0 ; i < base64Arr . length ; i ++ ) { byte [ ] decode = Base64 . decodeBase64 ( base64Arr [ i ] ) ; ByteArrayInputStream bis = new ByteArrayInputStream ( decode ) ; DataInputStream dis = new DataInputStream ( bis ) ; INDArray predict = Nd4j . read ( dis ) ; ret [ i ] = predict ; } return ret ; }
Returns a set of arrays from base 64 that is tab delimited .