How to run "Train a Convolutional Neural Network for Regression" example in single precision on laptop with NVIDIA GPU?

1 view (last 30 days)
Attempt 1: Use nndata2gpu: error only works for 2D array >> trainImagesSingle = nndata2gpu(trainImages,'single'); Error using nnsize (line 32) Data{1,1} is not two-dimensional.
Error in nndata2gpu (line 76) [N,Q,TS,M] = nnsize(x);
Attempt 2: Use 'single': runs but no improvement in training time >> trainImagesSingle = single(trainImages); >> trainAnglesSingle = single(trainAngles); >> net = trainNetwork(trainImagesSingle,trainAnglesSingle,layers,options);
It seems like it would be a fairly common thing to do since most laptop Nvidia gpu's (mine is Quadro M1200) have slow double precision.
Any idea?

Answers (1)

Joss Knight
Joss Knight on 9 Mar 2018
Laptop GPUs are severely limited in power and performance and are often no better for compute than the CPU, even in single precision. Try running GPU Bench to see if you can fairly expect your GPU to perform well.

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!