Alexandre Brown
04/03/2022, 5:45 AMmk.ndarray(it, batchSize, 3, targetHeight, targetWidth)
I tried chunking it to batches of 4 but I still hit 5GB RAM usage from this linePavel Gorgulov
04/03/2022, 12:50 PMval arr: Array<Float>
...
arr.toFloatArray()
This will still increase memory consumption, but not by that much.
The problem is general and related to boxing/unboxing.
Adding methods for Array<Number>
is not difficult and they will appear in the new release as soon as I am done with kotlin-native and build for Arm.Alexandre Brown
04/03/2022, 1:18 PMit
is a list of FloatArray.
Basically I have images that get preprocessed using KotlinDL, each image gives a FloatArray, then I convert the images (list of FloatArray) to a MultiArray<Float, D4> using MultiK
Let me try your suggestion of using Arrays.Pavel Gorgulov
04/03/2022, 2:03 PM