Hello,
To pass a "dlarray" to AlexNet and extract intermediate activations, convert the "dlarray" using "extractdata", process it through AlexNet, and convert the output back if needed.
Deep learning array for customization: https://www.mathworks.com/help/deeplearning/ref/dlarray.html
Extract data from "dlarray": https://www.mathworks.com/help/deeplearning/ref/dlarray.extractdata.html
Alternatively, convert AlexNet to a "dlnetwork" using MATLAB's "dlnetwork" function, which accepts "dlarray" inputs directly. This allows you to extract activations using the "forward" method while maintaining parameter traceability.
Compute deep learning network output for training: https://www.mathworks.com/help/deeplearning/ref/dlnetwork.forward.html
I hope this helps.