Skip to content
Discussion options

You must be logged in to vote

@huaizhe2012

Java doesn't allow operator override, so you won't be able to use index to modify NDArray.

In each operation of NDArray, it actually generates a temporary native NDArray, to avoid OOM, you need to close those temporary resource in each loop manually.

Each set/get call in NDArray has JNI call overhead, it's not efficient. You can do calculation in java heap and then set the hold data to NDArray.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@huaizhe2012
Comment options

Answer selected by huaizhe2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants