質問編集履歴

1

訂正

2018/08/26 23:48

投稿

trafalbad
trafalbad

スコア303

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,8 @@
1
1
  with文で複数のウィンドウを並べる方法はないでしょうか?
2
2
 
3
3
  gpuをwith文でいくつにも分割しようとしましたが、
4
+
5
+ ```python
4
6
 
5
7
  num_gpus=8
6
8
 
@@ -12,11 +14,15 @@
12
14
 
13
15
  AttributeError: 'DeviceSpec' object has no attribute 'split'
14
16
 
17
+ ```
18
+
15
19
 
16
20
 
17
21
 
18
22
 
19
23
  そこで以下のように訂正しましたが、
24
+
25
+ ```python
20
26
 
21
27
  gpus =[tf.device('/gpu:%d' % i) for i in range(NUMN_GPUS)]
22
28
 
@@ -28,14 +34,20 @@
28
34
 
29
35
  AttributeError: __enter__
30
36
 
37
+ ```
38
+
31
39
 
32
40
 
33
41
  with文で
42
+
43
+ ```python
34
44
 
35
45
  with tf.device('/gpu:0'), tf.device('/gpu:1')~ tf.device('/gpu:8')
36
46
 
37
47
 
38
48
 
49
+ ```
50
+
39
51
  と複数並べる方法はないでしょうか?
40
52
 
41
53
  ご教授お願いします