public class Nd4jBase64 extends Object
| Modifier and Type | Method and Description |
|---|---|
static INDArray[] |
arraysFromBase64(String base64)
Returns a set of arrays
from base 64 that is tab delimited.
|
static String |
arraysToBase64(INDArray[] arrays)
Returns a tab delimited base 64
representation of the given arrays
|
static String |
base64String(INDArray arr)
Returns an ndarray
as base 64
|
static String |
base64StringNumpy(INDArray arr)
Convert an
INDArray
to numpy byte array using
Nd4j.toNpyByteArray(INDArray) |
static INDArray |
fromBase64(String base64)
Create an ndarray from a base 64
representation
|
static INDArray |
fromNpyBase64(String base64)
Convert a numpy array from base64
to a byte array and then
create an
INDArray
from Nd4j.createNpyFromByteArray(byte[]) |
static boolean |
isMultiple(String base64)
Returns true if the base64
contains multiple arrays
This is delimited by tab
|
public static boolean isMultiple(String base64)
base64 - the base 64 to testpublic static INDArray[] arraysFromBase64(String base64) throws IOException
base64 - the base 64 that's tab delimitedIOExceptionpublic static String arraysToBase64(INDArray[] arrays) throws IOException
arrays - the arraysIOExceptionpublic static String base64StringNumpy(INDArray arr) throws IOException
INDArray
to numpy byte array using
Nd4j.toNpyByteArray(INDArray)arr - the input arrayIOExceptionpublic static INDArray fromNpyBase64(String base64)
INDArray
from Nd4j.createNpyFromByteArray(byte[])base64 - the base 64 byte arrayINDArraypublic static String base64String(INDArray arr) throws IOException
arr - the array to writeIOExceptionpublic static INDArray fromBase64(String base64) throws IOException
base64 - the base 64 to convertIOExceptionCopyright © 2019. All rights reserved.