Skip to content

Commit

Permalink
[api] alternative NDArray should not be closed in NDScope (#3490)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu authored Oct 2, 2024
1 parent b6656ed commit e623210
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/src/main/java/ai/djl/ndarray/NDArrayAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,7 @@ private NDArray getAlternativeArray() {
} else {
alternativeArray.set(getDataType().asDataType(toByteBuffer()));
}
NDScope.unregister(alternativeArray);
return alternativeArray;
}
}

0 comments on commit e623210

Please sign in to comment.