Skip to content

Commit bcba596

Browse files
committed
fixed minor typo in imagenet wrapper
1 parent aee9aa9 commit bcba596

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

python/caffe/imagenet/wrapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ def main(argv):
106106
files = glob.glob(os.path.join(FLAGS.root, "*." + FLAGS.ext))
107107
files.sort()
108108
print 'A total of %d files' % len(files)
109-
output = np.empty((len(files), self._output_blobs[0].shape[1]),
109+
output = np.empty((len(files), net._output_blobs[0].shape[1]),
110110
dtype=np.float32)
111111
start = time.time()
112112
for i, f in enumerate(files):
113113
output[i] = net.predict(f)
114-
if i % 1000 == 0:
114+
if i % 1000 == 0 and i > 0:
115115
print 'Processed %d files, elapsed %.2f s' % (i, time.time() - start)
116116
# Finally, write the results
117117
np.save(FLAGS.output, output)
@@ -120,4 +120,4 @@ def main(argv):
120120

121121
if __name__ == "__main__":
122122
import sys
123-
main(sys.argv)
123+
main(sys.argv)

0 commit comments

Comments
 (0)