Question
I have been using Deep Learning for a short time; I learned to use the GPU for network training. When I trained the neural network, I use the classify function to make it "work" on the images that the network has to classify. Does anyone know whether, in this working phase, "classify" uses GPU or CPU ? I couldn't find any information in the documentation, and the CPU/GPU setting that sets the training seems to me to have no effect in the working phase.
Expert Answer
Neeta Dsouza
PhD Expert
Answered Aug 26, 2026
Classify will automatically choose GPU (if it is available and suitable).
You can also specify the use of GPU explicitly:
classify(net, X, 'ExecutionEnvironment', 'gpu'); % Available options: 'auto', 'gpu', 'cpu', 'multi-gpu', 'parallel' % default is 'auto'
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related dnn Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →