質問編集履歴

5

記入漏れ

2022/10/28 01:52

投稿

lexlexlex
lexlexlex

スコア2

test CHANGED
File without changes
test CHANGED
File without changes

4

記入ミス

2022/10/27 06:48

投稿

lexlexlex
lexlexlex

スコア2

test CHANGED
File without changes
test CHANGED
@@ -53,7 +53,7 @@
53
53
 
54
54
  InvalidArgumentError: Cannot assign a device for operation Gs_1/_Run/Gs/latents_in: node Gs_1/_Run/Gs/latents_in (defined at /usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py:1748) was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0, /job:localhost/replica:0/task:0/device:XLA_GPU:0 ]. Make sure the device specification refers to a valid device.
55
55
  [[Gs_1/_Run/Gs/latents_in]]
56
- ```### 前提
56
+ ```
57
57
 
58
58
 
59
59
  ### 該当のソースコード

3

不要部分の削除

2022/10/27 06:47

投稿

lexlexlex
lexlexlex

スコア2

test CHANGED
File without changes
test CHANGED
@@ -67,11 +67,4 @@
67
67
  plt.tick_params(labelleft="off",left="off")
68
68
  ```
69
69
 
70
- ### 試したこと
71
70
 
72
- ここに問題に対して試したことを記載してください。
73
-
74
- ### 補足情報(FW/ツールのバージョンなど)
75
-
76
- ここにより詳細な情報を記載してください。
77
-

2

コードの追加

2022/10/27 06:47

投稿

lexlexlex
lexlexlex

スコア2

test CHANGED
File without changes
test CHANGED
@@ -53,4 +53,25 @@
53
53
 
54
54
  InvalidArgumentError: Cannot assign a device for operation Gs_1/_Run/Gs/latents_in: node Gs_1/_Run/Gs/latents_in (defined at /usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py:1748) was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0, /job:localhost/replica:0/task:0/device:XLA_GPU:0 ]. Make sure the device specification refers to a valid device.
55
55
  [[Gs_1/_Run/Gs/latents_in]]
56
+ ```### 前提
57
+
58
+
59
+ ### 該当のソースコード
60
+
61
+ ```python
62
+ # Generate image.
63
+ fmt = dict(func=tflib.convert_images_to_uint8, nchw_to_nhwc=True)
64
+ images = Gs.run(latents, None, truncation_psi=0.7, randomize_noise=True, output_transform=fmt)
65
+ plt.imshow(images[0])
66
+ plt.tick_params(labelbottom="off",bottom="off")
67
+ plt.tick_params(labelleft="off",left="off")
56
68
  ```
69
+
70
+ ### 試したこと
71
+
72
+ ここに問題に対して試したことを記載してください。
73
+
74
+ ### 補足情報(FW/ツールのバージョンなど)
75
+
76
+ ここにより詳細な情報を記載してください。
77
+

1

記入方法のミス

2022/10/27 06:45

投稿

lexlexlex
lexlexlex

スコア2

test CHANGED
File without changes
test CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
 
8
8
  ### 発生している問題・エラーメッセージ
9
+
10
+ ```
9
11
  InvalidArgumentError Traceback (most recent call last)
10
12
  <ipython-input-14-f04512004dce> in <module>
11
13
  1 # Generate image.
@@ -51,4 +53,4 @@
51
53
 
52
54
  InvalidArgumentError: Cannot assign a device for operation Gs_1/_Run/Gs/latents_in: node Gs_1/_Run/Gs/latents_in (defined at /usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py:1748) was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0, /job:localhost/replica:0/task:0/device:XLA_GPU:0 ]. Make sure the device specification refers to a valid device.
53
55
  [[Gs_1/_Run/Gs/latents_in]]
54
-
56
+ ```