I'v trained a deep network (e.g. LeNet) using NetTrain with TargetDevice -> "GPU". Everything works well and it is really fast. But now I have a trained network and tens of thousands of samples to classify. The GPU based training was evaluating ~ 1200 samples/second but seems like I can only use CPU based ParallelMap to evaluate trained network with samples (i.e. slow).

Is there a way to apply the trained network using the GPU as target device?

  • $\begingroup$ Not yet, but I hear gpu inference is coming in 11.1 $\endgroup$
    – M.R.
    Oct 7, 2016 at 16:14
  • 3
    $\begingroup$ Yes, we're trying to get it into 11.1, and will be available by writing net[input, TargetDevice -> "GPU"] instead of net[input]. $\endgroup$ Oct 9, 2016 at 10:33
  • $\begingroup$ I cannot test the GPU at the moment, as I'm having issues with TargetDevice->"GPU" on my Quadro K2100M (compute capability 3.0, latest drivers) for some reason, but would love to know if this was added, as I was hoping to use it. It shouldn't be that difficult in theory, as this is done every single time a loss is computed for training data as well as for validation data. $\endgroup$ Apr 3, 2017 at 23:35
  • $\begingroup$ Nevermind, just confirmed! It works in 11.1. trained[data,TargetDevice->"GPU"] $\endgroup$ Apr 5, 2017 at 5:54

1 Answer 1


Works in 11.1.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.