Easiest way toward Multi-GPU training in Tensorflow 2
Quick tip
Overview Easy parallelization over multiple GPUs can be accomplished in Tensorflow 2 using the ‘MirroredStrategy’ approach, especially if one is using Keras through the Tensorflow integration. This can be used as a replacement for ‘multi_gpu_model’ in Keras. There are a few caveats (bugs) with using this on TF2.0 (see below).
An example illustrating its use is shown below where two of the GPU devices are selected.
import tensorflow as tf from tensorflow.
[Read More]