Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a2fa46

Browse files
committed
Caffe Image Mean: Fix pep8 warnings.
1 parent 318e6bb commit 2a2fa46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python2.7/caffe-compute-image-mean.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
if any(imageName.lower().endswith("." + ext) for ext in exts):
3333
img = io.imread(os.path.join(subdir, fName))
3434
if img.shape == (152, 152, 3):
35-
mean[0][0] += img[:,:,0]
36-
mean[0][1] += img[:,:,1]
37-
mean[0][2] += img[:,:,2]
35+
mean[0][0] += img[:, :, 0]
36+
mean[0][1] += img[:, :, 1]
37+
mean[0][2] += img[:, :, 2]
3838
N += 1
3939
if N % 1000 == 0:
4040
elapsed = time.time() - beginTime
4141
print("Processed {} images in {:.2f} seconds. "
4242
"{:.2f} images/second.".format(N, elapsed,
43-
N/elapsed))
43+
N / elapsed))
4444
mean[0] /= N
4545

4646
blob = array_to_blobproto(mean)

0 commit comments

Comments
 (0)