Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c217353 commit 197858eCopy full SHA for 197858e
code2seq.py
@@ -8,8 +8,9 @@
8
9
if __name__ == '__main__':
10
physical_devices = tf.config.list_physical_devices('GPU')
11
- tf.config.experimental.set_memory_growth(physical_devices[0], True)
12
- # tf.config.set_visible_devices([], 'GPU')
+ if len(physical_devices):
+ tf.config.experimental.set_memory_growth(physical_devices[0], True)
13
+ # tf.config.set_visible_devices([], 'GPU')
14
15
args = read_args()
16
0 commit comments