projects
/
pysvrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bdc761
)
Minor bug fix.
author
Francois Fleuret
<francois@fleuret.org>
Mon, 26 Jun 2017 15:40:25 +0000
(17:40 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Mon, 26 Jun 2017 15:40:25 +0000
(17:40 +0200)
cnn-svrt.py
patch
|
blob
|
history
diff --git
a/cnn-svrt.py
b/cnn-svrt.py
index
0091aba
..
966ea4a
100755
(executable)
--- a/
cnn-svrt.py
+++ b/
cnn-svrt.py
@@
-355,7
+355,8
@@
def nb_errors(model, data_set, mistake_filename_pattern = None):
img = input[i].clone()
img.sub_(img.min())
img.div_(img.max())
- filename = mistake_filename_pattern.format(b + i, target[i])
+ k = b * data_set.batch_size + i
+ filename = mistake_filename_pattern.format(k, target[i])
torchvision.utils.save_image(img, filename)
print(Fore.RED + 'Wrote ' + filename + Style.RESET_ALL)
return ne