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 rand methods give zeros for BFLOAT16 #8010

Closed
RobAltena opened this issue Jul 15, 2019 · 1 comment
Closed

Nd4j rand methods give zeros for BFLOAT16 #8010

RobAltena opened this issue Jul 15, 2019 · 1 comment
Assignees
Labels
Bug Bugs and problems
Milestone

Comments

@RobAltena
Copy link
Contributor

The following test returns zeros arrays, not random ones:

@Test
void testRndBloat16() {
    INDArray x  = Nd4j.rand(DataType.BFLOAT16 , 'c', new int[]{5});
    System.out.println(x);

    x = Nd4j.randn(DataType.BFLOAT16 , 10);
    System.out.println(x);
}

output:

[         0,         0,         0,         0,         0]
[         0,         0,         0,         0,         0,         0,         0,         0,         0,         0]

Behavior for other datatypes is as expected: An exception for non floating point datatypes or a random array.

@raver119 raver119 self-assigned this Jul 15, 2019
@raver119 raver119 added the Bug Bugs and problems label Jul 15, 2019
@AlexDBlack AlexDBlack added this to the 1.0.0-beta5 milestone Jul 27, 2019
@raver119 raver119 added the C++ label Aug 14, 2019
@raver119
Copy link
Contributor

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bugs and problems
Projects
None yet
Development

No branches or pull requests

3 participants