All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nd4j.imports.graphmapper.tf.tensors.TFTensorMapper Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.nd4j.imports.graphmapper.tf.tensors;

import org.nd4j.linalg.api.buffer.DataType;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.tensorflow.framework.TensorProto;

import java.nio.Buffer;
import java.nio.ByteBuffer;

/**
 * @param  Java array type
 * @param  Java buffer type
 */
public interface TFTensorMapper {

    enum ValueSource {EMPTY, VALUE_COUNT, BINARY};

    DataType dataType();

    long[] shape();

    boolean isEmpty();

    ValueSource valueSource();

    int valueCount();

    J newArray(int length);

    B getBuffer(ByteBuffer bb);

    INDArray toNDArray();

    void getValue(J jArr, int i);

    void getValue(J jArr, B buffer, int i);

    INDArray arrayFor(long[] shape, J jArr);


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy