質問編集履歴

1

情報を追加しました

2020/09/03 00:33

投稿

aho_tarou
aho_tarou

score1

test CHANGED
File without changes
test CHANGED
@@ -4,9 +4,7 @@
4
4
 
5
5
  ここに質問の内容を詳しく書いてください。
6
6
 
7
- (例)PHP(CakePHP)で●●なシステムを作っています。
7
+ (例)PHP(C
8
-
9
- ■■な機能を実装中に以下のエラーメッセージが発生しました。
10
8
 
11
9
 
12
10
 
@@ -18,6 +16,112 @@
18
16
 
19
17
  おそらくnet.pyで行っているデータセットの作り方に問題があるのかと思いますが、対処法がわかりません。
20
18
 
19
+
20
+
21
+ 情報が不足しているというご指摘がありましたので、下にエラーメッセージの全文を追加しました。
22
+
23
+
24
+
25
+ Exception in main training loop: too many values to unpack (expected 2)
26
+
27
+ Traceback (most recent call last):
28
+
29
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/training/trainer.py", line 343, in run
30
+
31
+ update()
32
+
33
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/training/updaters/standard_updater.py", line 240, in update
34
+
35
+ self.update_core()
36
+
37
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/training/updaters/standard_updater.py", line 245, in update_core
38
+
39
+ batch = iterator.next()
40
+
41
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/iterators/serial_iterator.py", line 77, in __next__
42
+
43
+ batch = [self.dataset[index] for index in indices]
44
+
45
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/iterators/serial_iterator.py", line 77, in <listcomp>
46
+
47
+ batch = [self.dataset[index] for index in indices]
48
+
49
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/dataset/dataset_mixin.py", line 67, in __getitem__
50
+
51
+ return self.get_example(index)
52
+
53
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/datasets/transform_dataset.py", line 51, in get_example
54
+
55
+ in_data = self._dataset[i]
56
+
57
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/dataset/dataset_mixin.py", line 67, in __getitem__
58
+
59
+ return self.get_example(index)
60
+
61
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/datasets/image_dataset.py", line 158, in get_example
62
+
63
+ path, int_label = self._pairs[i]
64
+
65
+ Will finalize trainer extensions and updater before reraising the exception.
66
+
67
+ Traceback (most recent call last):
68
+
69
+ File "net.py", line 56, in <module>
70
+
71
+ trainer.run()
72
+
73
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/training/trainer.py", line 376, in run
74
+
75
+ six.reraise(*exc_info)
76
+
77
+ File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
78
+
79
+ raise value
80
+
81
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/training/trainer.py", line 343, in run
82
+
83
+ update()
84
+
85
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/training/updaters/standard_updater.py", line 240, in update
86
+
87
+ self.update_core()
88
+
89
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/training/updaters/standard_updater.py", line 245, in update_core
90
+
91
+ batch = iterator.next()
92
+
93
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/iterators/serial_iterator.py", line 77, in __next__
94
+
95
+ batch = [self.dataset[index] for index in indices]
96
+
97
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/iterators/serial_iterator.py", line 77, in <listcomp>
98
+
99
+ batch = [self.dataset[index] for index in indices]
100
+
101
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/dataset/dataset_mixin.py", line 67, in __getitem__
102
+
103
+ return self.get_example(index)
104
+
105
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/datasets/transform_dataset.py", line 51, in get_example
106
+
107
+ in_data = self._dataset[i]
108
+
109
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/dataset/dataset_mixin.py", line 67, in __getitem__
110
+
111
+ return self.get_example(index)
112
+
113
+ File "/home/bigfoot/.local/lib/python3.8/site-packages/chainer/datasets/image_dataset.py", line 158, in get_example
114
+
115
+ path, int_label = self._pairs[i]
116
+
117
+ ValueError: too many values to unpack (expected 2)
118
+
119
+
120
+
121
+
122
+
123
+
124
+
21
125
  ### 該当のソースコード
22
126
 
23
127