Replies: 2 comments 2 replies
-
In DJL, NDArray native memory is released when it's parent NDManager is closed. To avoid memory increase in the loop, you do the following:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Can you simply do
and then use the outcome as the final ndarray? I am assuming your operation can be done through matrix-wide operation. Can you explain breifly what operation you are trying to achieve here? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm writing some code for implementing a web request that uses a CNN model. Inside this request a need to operate with a DJL NDArray inside a for loop. I have detect that the memory consuption increases about 200Mb after the for loop execution. The main problem is that this memory is not freed at any time. I don't know if this is a problem of my code or a memory leak in the DJL library. The code inside the for loop is the following. Any suggestion is welcome. Thak you in advance.
PD: colors and imgCopy are two NDArrays
Beta Was this translation helpful? Give feedback.
All reactions