質問編集履歴

1

エラーを更新しました。

2022/10/25 06:01

投稿

linpoti
linpoti

スコア1

test CHANGED
File without changes
test CHANGED
@@ -7,7 +7,28 @@
7
7
 
8
8
  ### 発生している問題・エラーメッセージ
9
9
 
10
+ Traceback (most recent call last):
11
+ File "/home/workspace/username/VGG.py", line 107, in <module>
12
+ plt.plot(accs, label='train acc')
13
+ File "/home/anaconda3/envs//lib/python3.10/site-packages/matplotlib/pyplot.py", line 2730, in plot
14
+ return gca().plot(
15
+ File "/home/anaconda3/envs/lib/python3.10/site-packages/matplotlib/axes/_axes.py", line 1662, in plot
16
+ lines = [*self._get_lines(*args, data=data, **kwargs)]
17
+ File "/home/anaconda3/envs/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 311, in __call__
18
+ yield from self._plot_args(
19
+ File "/home/anaconda3/envs/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 496, in _plot_args
20
+ x, y = index_of(xy[-1])
21
+ File "/home/anaconda3/envs/lib/python3.10/site-packages/matplotlib/cbook/__init__.py", line 1690, in index_of
22
+ y = _check_1d(y)
23
+ File "/home/anaconda3/envs/lib/python3.10/site-packages/matplotlib/cbook/__init__.py", line 1382, in _check_1d
24
+ return np.atleast_1d(x)
25
+ File "<__array_function__ internals>", line 180, in atleast_1d
26
+ File "/home/anaconda3/envs/lib/python3.10/site-packages/numpy/core/shape_base.py", line 65, in atleast_1d
27
+ ary = asanyarray(ary)
28
+ File "/home/anaconda3/envs/lib/python3.10/site-packages/torch/_tensor.py", line 757, in __array__
29
+ return self.numpy()
10
30
  TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
31
+
11
32
 
12
33
 
13
34
  ### 該当のソースコード