Can I use cpu instead of gpu for the DeepLearni​ngImageCla​ssificatio​nExample.m

I was running the "DeepLearningImageClassificationExample.m" example but this failed because of unsupported GPU. I did see that this example requires a "CUDA-capable GPU card" but is there a manner to to use the parameters ['ExecutionEnvironment','cpu'] in the "activation" function, and use the CPU instead?

Antworten (1)

Joss Knight
Joss Knight am 31 Mai 2017

2 Kommentare

On line 68 change
trainingFeatures = activations(net, augmentedTrainingSet, featureLayer, ...
'MiniBatchSize', 32, 'OutputAs', 'columns');
to
trainingFeatures = activations(net, augmentedTrainingSet, featureLayer, ...
'MiniBatchSize', 32, 'OutputAs', 'columns', 'ExecutionEnvironment', 'cpu');

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 30 Mai 2017

Kommentiert:

am 17 Apr. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by