A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/deeplearning4j/deeplearning4j/issues/8582 below:

need UInt32 and UInt64 indexers · Issue #8582 · deeplearning4j/deeplearning4j · GitHub

https://github.com/eclipse/deeplearning4j/blob/master/nd4j/nd4j-buffer/src/main/java/org/nd4j/linalg/api/buffer/BaseDataBuffer.java#L578-L587

Unsurprisingly, this overflows for large values in toString, and is also returning incorrect values in getDouble, getInt etc

    @Test
    public void testUint32(){
        INDArray arr = Nd4j.create(DataType.UINT32, 10);
        arr.assign(1024);
        System.out.println(arr);
        arr.assign(Integer.MAX_VALUE);
        System.out.println(arr);
        System.out.println(arr.getDouble(0));
        System.out.println(arr.getInt(0));
    }

[      1024,      1024,      1024,      1024,      1024,      1024,      1024,      1024,      1024,      1024]
[        -1,        -1,        -1,        -1,        -1,        -1,        -1,        -1,        -1,        -1]
-1.0
-1

These indexers would need to go in JavaCPP though

https://github.com/bytedeco/javacpp/tree/master/src/main/java/org/bytedeco/javacpp/indexer


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4