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

libnd4j: matrix_determinant op returning rank 1 shape info instead of scalar #6441

Closed
AlexDBlack opened this issue Sep 14, 2018 · 1 comment

Comments

@AlexDBlack
Copy link
Contributor

commented Sep 14, 2018

For the case below: should be getting rank 0 shape ([]) instead I'm getting a rank 1 shape [1].

Strange thing is: the logic here looks correct to me, so I don't know how/why it could be returning shape [1] here...
https://github.com/deeplearning4j/deeplearning4j/blob/master/libnd4j/include/ops/declarable/generic/parity_ops/matrix_determinant.cpp#L41-L46

    @Test
    public void testMatrixDeterminantShapeFunction(){
        INDArray in = Nd4j.create(5,5);
        DynamicCustomOp op = DynamicCustomOp.builder("matrix_determinant")
                .addInputs(in).build();
        List<long[]> outShape = Nd4j.getExecutioner().calculateOutputShape(op);
        System.out.println(Arrays.toString(outShape.get(0)));

        long[] shapeExp = new long[]{};
        assertArrayEquals(shapeExp, outShape.get(0));
    }
@lock

This comment has been minimized.

Copy link

commented Oct 19, 2018

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 Oct 19, 2018

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