projects
/
platform
/
upstream
/
caffeonacl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
536851c
)
Merge pull request #5181 from willyd/download-model-py3
author
Evan Shelhamer
<shelhamer@imaginarynumber.net>
Tue, 17 Jan 2017 19:37:41 +0000
(11:37 -0800)
committer
GitHub
<noreply@github.com>
Tue, 17 Jan 2017 19:37:41 +0000
(11:37 -0800)
Python 2/3 compatible download_model_binary.py
scripts/download_model_binary.py
patch
|
blob
|
history
diff --git
a/scripts/download_model_binary.py
b/scripts/download_model_binary.py
index
fcdbb5a
..
a72fd5d
100755
(executable)
--- a/
scripts/download_model_binary.py
+++ b/
scripts/download_model_binary.py
@@
-3,10
+3,11
@@
import os
import sys
import time
import yaml
-import urllib
import hashlib
import argparse
+from six.moves import urllib
+
required_keys = ['caffemodel', 'caffemodel_url', 'sha1']
@@
-69,7
+70,7
@@
if __name__ == '__main__':
sys.exit(0)
# Download and verify model.
- urllib.urlretrieve(
+ urllib.
request.
urlretrieve(
frontmatter['caffemodel_url'], model_filename, reporthook)
if not model_checks_out():
print('ERROR: model did not download correctly! Run this again.')