Message Boards Message Boards

Loss is high using TargetDevice -> "GPU"? (Solved)

Hello!

I am trying to start exploring WL's neural network capabilities and syntax. As I have a GPU on my PC, I wanted to make use of it. I've read two related posts on Community (this and this) and, following suggestions presented there, walked through the installation of the CUDA toolkit and made sure that CUDAQ[] returns True.

Then I tried to run the very first example in the documentation of the TargetDevice option, i.e.:

trained = NetTrain[NetModel["LeNet"], "MNIST", TargetDevice -> "GPU"]

And it worked in a sense that a window displaying training progress appeared and no error messages were thrown. But the problem was that the network did not train - the loss remained as high as in the very beginning of the training process.

Then I tried to run the ImageRestyle function with TragetDevice -> "GPU" option enabled. Result was not satisfactory - the loss increased through the training.

Are there any suggestions on how can I fix the problem? The acceleration of "training" is impressive and I would like not to give up.

POSTED BY: Nikolay Shilov

UPD: I re-installed Mathematica and it fixed the problem. Maybe the cause was that I installed CUDA Toolkit after the previous Mathematica installation downloaded GPU libraries and threw an error.

POSTED BY: Nikolay Shilov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract