フィルターのクリア

How do I use multiple GPU for GAN

4 ビュー (過去 30 日間)
Shaw
Shaw 2021 年 10 月 12 日
コメント済み: Shuaibin WAN 2021 年 11 月 25 日
In the example metioned on MATLAB "Train Generative Adversarial Network (GAN) - MATLAB & Simulink (mathworks.com)" how/where should the code be changed so as to use multiple GPU's?
Though, "auto" is used, all the GPU's are not being used by default. I have 4 gpu's and want to use them all.
  1 件のコメント
Shuaibin WAN
Shuaibin WAN 2021 年 11 月 25 日
Hi Shaw,
I also encounter this problem. Did you have any solution now?
Many thanks!

サインインしてコメントする。

回答 (2 件)

Antti
Antti 2021 年 10 月 12 日
編集済み: Antti 2021 年 10 月 12 日
Hi! You should change 'ExecutionEnvironment' option to 'multi-gpu'. More info here. Before doing that, you might want to check if your GPU's are detected b
>> numGPU = gpuDeviceCount("available")
you don't get 4 as a result, then your GPU's are not supported by MATLAB, or there's a driver issue. Please accept my answer formally if this worked for you.
  1 件のコメント
Shaw
Shaw 2021 年 10 月 12 日
Hey, I have already tried using that. It throws me an error:
"The input, "multi-gpu" did not match any of the valid values."
Valid values being, 'auto' ,'gpu' ,'cpu'
And yes, I got 4 as a result for my GPUcount

サインインしてコメントする。


Antti
Antti 2021 年 10 月 12 日
It appears that when using custom training loops (as in the example), "multi-gpu" option is not supported. However, you can still take advantage multiple GPUs, by launching parallel MATLAB workers, where each worker will use a GPU of its own. See this example: https://se.mathworks.com/help/deeplearning/ug/train-network-in-parallel-with-custom-training-loop.html. Please formally accept my answer if this solves your problem.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by