We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aee9aa9 commit bcba596Copy full SHA for bcba596
1 file changed
python/caffe/imagenet/wrapper.py
@@ -106,12 +106,12 @@ def main(argv):
106
files = glob.glob(os.path.join(FLAGS.root, "*." + FLAGS.ext))
107
files.sort()
108
print 'A total of %d files' % len(files)
109
- output = np.empty((len(files), self._output_blobs[0].shape[1]),
+ output = np.empty((len(files), net._output_blobs[0].shape[1]),
110
dtype=np.float32)
111
start = time.time()
112
for i, f in enumerate(files):
113
output[i] = net.predict(f)
114
- if i % 1000 == 0:
+ if i % 1000 == 0 and i > 0:
115
print 'Processed %d files, elapsed %.2f s' % (i, time.time() - start)
116
# Finally, write the results
117
np.save(FLAGS.output, output)
@@ -120,4 +120,4 @@ def main(argv):
120
121
if __name__ == "__main__":
122
import sys
123
- main(sys.argv)
+ main(sys.argv)
0 commit comments