1
$\begingroup$

We intend to train a neural network. It has a hyperparameter, such as the learning rate. We want to compare the training results of different hyperparameters. Our computer has two multi-core CPUs and an NVIDA GPU. We want to train with GPU and adjust parameters with ParallelTable. The results show that the utilization of GPU and CPU is very low, which is no different from using Table. May I ask: Is it possible to improve the utilization of GPU and speed up the parameter adjustment? The code is illustrated as follows:

net=NetChain[{LinearLayer[], LogisticSigmoid}];
data = {1 -> False, 2 -> False, 3 -> True, 4 -> True};

AbsoluteTiming[
 ParallelTable[NetTrain[net, data, All, MaxTrainingRounds -> 1000, 
  TrainingProgressReporting -> None, TargetDevice -> "GPU", 
   LearningRate -> c], {c, 0.1, 0.2, 0.1/200}];]
$\endgroup$

0

Your Answer

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

Browse other questions tagged or ask your own question.