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

NDArray stype access #51

Open
tjad opened this issue Nov 18, 2020 · 3 comments
Open

NDArray stype access #51

tjad opened this issue Nov 18, 2020 · 3 comments

Comments

@tjad
Copy link

tjad commented Nov 18, 2020

No description provided.

tjad added a commit to Yobisense/mxnet.rb that referenced this issue Nov 27, 2020
This was referenced Nov 30, 2020
@tjad
Copy link
Author

tjad commented Dec 4, 2020

The code looks clean to me, changing no existing functionality. However, upon addition of this code, the functionality of NDArray breaks such that initialization of NDArray fills with random values when using .zeros, .ones, .array etc, it is also no longer possible to make assignments to the array correctly. It is as if the array handle is bad.

You will notice there are no code changes, only additions. The closest code change is addition of a local variable mStorageType.

To reproduce, checkout code and run in IRB

require 'mxnet'

a = MXNet::NDArray.ones(5)

[-1.80243e+08, 4.57118e-41, -1.80256e+08, 4.57118e-41, 0] <MXNet::NDArray 5 @cpu(0)>

Whichever initializer I use, the result is similar.

tjad added a commit to Yobisense/mxnet.rb that referenced this issue Dec 5, 2020
tjad added a commit to Yobisense/mxnet.rb that referenced this issue Dec 6, 2020
tjad added a commit to Yobisense/mxnet.rb that referenced this issue Dec 6, 2020
tjad added a commit to Yobisense/mxnet.rb that referenced this issue Dec 6, 2020
@tjad
Copy link
Author

tjad commented Dec 6, 2020

@mrkn This task is complete with tests.

@mrkn
Copy link
Owner

mrkn commented Dec 8, 2020

@tjad Sorry, I'm still busy to work for fiddle and ruby 3.0. Please wait for a moment.

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

No branches or pull requests

2 participants