Java Code Examples for org.nd4j.linalg.api.shape.Shape#options()

The following examples show how to use org.nd4j.linalg.api.shape.Shape#options() . 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: ArrayOptionsHelper.java    From deeplearning4j with Apache License 2.0 5 votes vote down vote up
public static ArrayType arrayType(long[] shapeInfo) {
    val opt = Shape.options(shapeInfo);

    if (hasBitSet(opt, ATYPE_SPARSE_BIT))
        return ArrayType.SPARSE;
    else if (hasBitSet(opt, ATYPE_COMPRESSED_BIT))
        return ArrayType.COMPRESSED;
    else if (hasBitSet(opt, ATYPE_EMPTY_BIT))
        return ArrayType.EMPTY;
    else
        return ArrayType.DENSE;
}
 
Example 2
Source File: ArrayOptionsHelper.java    From deeplearning4j with Apache License 2.0 4 votes vote down vote up
public static boolean hasBitSet(long[] shapeInfo, long bit) {
    val opt = Shape.options(shapeInfo);

    return hasBitSet(opt, bit);
}
 
Example 3
Source File: ArrayOptionsHelper.java    From deeplearning4j with Apache License 2.0 4 votes vote down vote up
public static DataType dataType(long[] shapeInfo) {
    val opt = Shape.options(shapeInfo);
    return dataType(opt);
}