Java Code Examples for org.nd4j.common.primitives.Pair#create()

The following examples show how to use org.nd4j.common.primitives.Pair#create() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseShapeInfoProvider.java    From deeplearning4j with Apache License 2.0 4 votes vote down vote up
@Override
public Pair<DataBuffer, long[]> createShapeInformation(long[] shape, long[] stride, long elementWiseStride, char order, DataType dataType, boolean empty) {
    DataBuffer buffer = Shape.createShapeInformation(shape, stride, elementWiseStride, order, dataType, empty);
    buffer.setConstant(true);
    return Pair.create(buffer, buffer.asLong());
}
 
Example 2
Source File: BaseShapeInfoProvider.java    From deeplearning4j with Apache License 2.0 4 votes vote down vote up
@Override
public Pair<DataBuffer, long[]> createShapeInformation(long[] shape, long[] stride, long elementWiseStride, char order, long extras) {
    DataBuffer buffer = Shape.createShapeInformation(shape, stride, elementWiseStride, order, extras);
    buffer.setConstant(true);
    return Pair.create(buffer, buffer.asLong());
}