Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ND4J: Add check + useful exception for reductions on empty arrays #7143

Closed
AlexDBlack opened this issue Feb 11, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@AlexDBlack
Copy link
Member

commented Feb 11, 2019

    @Test
    public void testEmptyReduce(){
        INDArray empty = Nd4j.empty(DataType.DOUBLE);
        empty.stdNumber();
        empty.sumNumber();      //Also exception here
    }
java.lang.NullPointerException
	at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.exec(NativeOpExecutioner.java:361)
	at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.exec(NativeOpExecutioner.java:222)
	at org.nd4j.linalg.api.ndarray.BaseNDArray.std(BaseNDArray.java:4790)
	at org.nd4j.linalg.api.ndarray.BaseNDArray.std(BaseNDArray.java:4784)
	at org.nd4j.linalg.api.ndarray.BaseNDArray.stdNumber(BaseNDArray.java:1294)
	at org.nd4j.TestNets.testEmptyReduce(TestNets.java:46)

AlexDBlack added a commit that referenced this issue Feb 14, 2019

AlexDBlack added a commit that referenced this issue Feb 15, 2019

[WIP] Misc DL4J/ND4J Fixes (#7169)
* #7152 Yolo2OutputLayer label shape validation

* #7143 empty array checks

* #7123 Update old URLs

* #7115 Fix issue with LastTimeStep and masks

* #6809 Fix updater state view array layout when dynamically changing LR with updaters like Adam

* Delete old/unmaintained VideoRecordReader

* #7104 Fix memory info reporting when activations shape/length can't be inferred (some RNNs etc)
@lock

This comment has been minimized.

Copy link

commented Mar 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 17, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.