回答編集履歴
2
コード修正
answer
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
```python
|
2
|
-
if test_iterator.is_new_epoch:
|
3
2
|
test_iterator.epoch = 0
|
4
3
|
test_iterator.current_position = 0
|
5
4
|
test_iterator.is_new_epoch = False
|
6
5
|
test_iterator._pushed_position = None
|
7
|
-
break
|
8
6
|
```
|
9
7
|
↓ 修正
|
10
8
|
```python
|
11
|
-
if test_iterator.is_new_epoch:
|
12
9
|
test_iterator.reset()
|
13
|
-
break
|
14
10
|
```
|
15
11
|
|
16
12
|
参考
|
1
コードの修正
answer
CHANGED
@@ -5,16 +5,12 @@
|
|
5
5
|
test_iterator.is_new_epoch = False
|
6
6
|
test_iterator._pushed_position = None
|
7
7
|
break
|
8
|
-
|
9
|
-
print ("検証誤差:{: .04f} 検証精度:{: .02f}".format(np.mean(test_losses), np.mean(test_accuracies)))
|
10
8
|
```
|
11
|
-
↓ 修正
|
9
|
+
↓ 修正
|
12
10
|
```python
|
13
11
|
if test_iterator.is_new_epoch:
|
14
12
|
test_iterator.reset()
|
15
13
|
break
|
16
|
-
|
17
|
-
print ("検証誤差:{: .04f} 検証精度:{: .02f}".format(np.mean(test_losses), np.mean(test_accuracies)))
|
18
14
|
```
|
19
15
|
|
20
16
|
参考
|