minibatchpredict memory leak bug?

basically as the title says. not sure whether this is intended.
the problem can be reproduced using the code below.
"net_2btest.mat" can be obtained here
===============
load('net_2btest.mat','net');
a = rand(101,1,100);
for i = 1 : 10000000
if ~rem(i,100)
i
memory
end
b = dlarray(a,"TCB");
c = minibatchpredict(net,b);
end
===============
if you keep attention on memory. i.e., Memory used by MATLAB: xxxx MB
you`d find every minibatchpredict call uses ~500kb-1mb more memory.

답변 (1개)

Abhiram
Abhiram 2025년 4월 23일

0 개 추천

Hi @Felix,
I have noticed a similar behaviour with the ‘minibatchpredict’ function when working with MATLAB R2024b. Upgrading the MATLAB version to R2025a Prerelease has solved the issue.
Hope this helps!

카테고리

도움말 센터File Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품

릴리스

R2024b

질문:

2025년 4월 19일

답변:

2025년 4월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by