... | @@ -15,9 +15,9 @@ import tensorflow as tf |
... | @@ -15,9 +15,9 @@ import tensorflow as tf |
|
|
|
|
|
gpus = tf.config.experimental.list_physical_devices('GPU')
|
|
gpus = tf.config.experimental.list_physical_devices('GPU')
|
|
if gpus:
|
|
if gpus:
|
|
tf.config.experimental.set_virtual_device_configuration(
|
|
tf.config.experimental.set_virtual_device_configuration(
|
|
gpus[0], [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=megabytes)]
|
|
gpus[0], [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=megabytes)]
|
|
)
|
|
)
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
... | | ... | |