AlexNet.h Model Crashes when the batch size is more than 5 or 6
Dear ARM Developers:
Thank you so much for all your support along the way.
Currently, I run into some problem when using the /test/model_objects/AlexNet.h. I have written a program that uses AlexNet.h as an object and tests how fast forward propagation is. When the batch size is 1, the program usually runs, but when I switch the batch size into 6 or 7, the program will just crash.
This is part of my program to wrap the AlexNet object.

And It is possible to use the first parameter of init_weights to specify the batch size in the line
MyAlexNet.init_weights(1,false);
After I switch the parameter from 1 to 7, this happens:

In the beginning, I thought that I have run out the GPU memory, but when I am using the htop
command, I find out that I have run out the memory on my ordroid board instead:

I am just wondering, Is 2GB of the memory too small? I have heard that 2GB of memory for an embedded device is not too small. Could it be that GPU memory ran out? Did I use the AlexNet.h somehow wrong?
The platform of my odroid is
Linux odroid 3.10.103-124 #1 SMP PREEMPT Tue Oct 11 11:51:06 UTC 2016 armv7l armv7l armv7l GNU/Linux
The following is the information about the Mali GPUs I am using,

Interesting, we haven't tried with a batch size of 6 or 7, usually we only run with 1, 4 and 8. We'll try to reproduce on our end, in the meantime could you try with 8 to see if it works ?
@XiaoMaol On Odroid and similar system-on-a-chip platforms, the total system memory (e.g. 2 GB) is shared between all the devices. The GPU doesn't have any dedicated physical memory like on desktop or server cards. When you run out of the system memory, you cannot use the GPU either.
Also, because the memory is only shared physically (OpenCL 1.x limitation), you need to copy or map from the host memory space to the device memory space, which may increase your memory consumption.
Sorry I have been away for a while. I think the problem is with the memory as @psyhtest suggested. 8 does not work either. Thank you for all you support!