Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

How to get the true value of the mxnet.NDArray by Scala #12680

Closed
ustcfd opened this issue Sep 27, 2018 · 2 comments
Closed

How to get the true value of the mxnet.NDArray by Scala #12680

ustcfd opened this issue Sep 27, 2018 · 2 comments

Comments

@ustcfd
Copy link

ustcfd commented Sep 27, 2018

I’ve trained my model using mxnet_1.3 python HybridBlock. Then I load the trained model in Scala. I didn’t get any errors when I run demo.Scala, and the output is shown in the following.

mxnet_scala

But now I got few problems:

  • Is possible to get the true value of the NDarray?
    I followed the examples of the API https://mxnet.apache.org/api/scala/ndarray.html trying to print the value of NDarray by toarray. But I got an odd output looks like “F@4b553d2d” including the final output. I am very confused about the output value of NDArray.The demo code is shown in demo.Scala.

  • The API document of Mxnet demonstrates that the type input of the NDArray.array is restricted to Array[float].
    Do I have to flatten my n-dimension matrix to one-dimension Array[float] when I want to create my own data?
    Are there any other strategies to feed my data just like Numpy or python which directly take a matrix as an input?

Maybe I was doing something wrong. Please suggest!
Thank you

@vandanavk
Copy link
Contributor

vandanavk commented Sep 27, 2018

Please close this in favor of #12679. This seems to be a duplicate. Thanks.

@ustcfd ustcfd closed this as completed Sep 27, 2018
@ustcfd
Copy link
Author

ustcfd commented Sep 27, 2018

This is a duplicate。My fault,sorry.

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

No branches or pull requests

2 participants