| Constructor and Description |
|---|
ArrowSerde() |
| Modifier and Type | Method and Description |
|---|---|
static int |
addDataForArr(com.google.flatbuffers.FlatBufferBuilder bufferBuilder,
INDArray arr)
Create a
Buffer
representing the location metadata of the actual data
contents for the ndarrays' DataBuffer |
static void |
addTypeTypeRelativeToNDArray(com.google.flatbuffers.FlatBufferBuilder bufferBuilder,
INDArray arr)
Convert the given
INDArray
data type to the proper data type for the tensor. |
static int |
createDims(com.google.flatbuffers.FlatBufferBuilder bufferBuilder,
INDArray arr)
Create the dimensions for the flatbuffer builder
|
static INDArray |
fromTensor(org.apache.arrow.flatbuf.Tensor tensor)
Convert a
Tensor
to an INDArray |
static long[] |
getArrowStrides(INDArray arr)
Get the strides of this
INDArray
multiplieed by the element size. |
static org.apache.arrow.flatbuf.Tensor |
toTensor(INDArray arr)
Convert an
INDArray
to an arrow Tensor |
static org.nd4j.linalg.api.buffer.DataType |
typeFromTensorType(byte type,
int elementSize)
Create thee databuffer type frm the given type,
relative to the bytes in arrow in class:
Type |
public static INDArray fromTensor(org.apache.arrow.flatbuf.Tensor tensor)
Tensor
to an INDArraytensor - the input tensorINDArraypublic static org.apache.arrow.flatbuf.Tensor toTensor(INDArray arr)
INDArray
to an arrow Tensorarr - the array to convertTensorpublic static int addDataForArr(com.google.flatbuffers.FlatBufferBuilder bufferBuilder,
INDArray arr)
Buffer
representing the location metadata of the actual data
contents for the ndarrays' DataBufferbufferBuilder - the buffer builder in usearr - the array to add the underlying data forpublic static void addTypeTypeRelativeToNDArray(com.google.flatbuffers.FlatBufferBuilder bufferBuilder,
INDArray arr)
INDArray
data type to the proper data type for the tensor.bufferBuilder - the buffer builder in usearr - the array to conver tthe data type forpublic static int createDims(com.google.flatbuffers.FlatBufferBuilder bufferBuilder,
INDArray arr)
bufferBuilder - the buffer builder to usearr - the input arraypublic static long[] getArrowStrides(INDArray arr)
INDArray
multiplieed by the element size.
This is the Tensor and numpy formatarr - the array to convertpublic static org.nd4j.linalg.api.buffer.DataType typeFromTensorType(byte type,
int elementSize)
Typetype - the type to create the nd4j DataType fromelementSize - the element sizeCopyright © 2019. All rights reserved.