... | ... | @@ -13,6 +13,7 @@ If you use TensorFlow 2.0 (or Keras with a TensorFlow backend), you can limit th |
|
|
```python
|
|
|
import tensorflow as tf
|
|
|
|
|
|
megabytes = 2048
|
|
|
gpus = tf.config.experimental.list_physical_devices('GPU')
|
|
|
if gpus:
|
|
|
for gpu in gpus:
|
... | ... | |