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

Skip to content

Commit 45ec8d1

Browse files
authored
Update utils.py
1 parent a88d2a2 commit 45ec8d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# 代码仅仅支持RGB图像的预测,所有其它类型的图像都会转化成RGB
77
#---------------------------------------------------------#
88
def cvtColor(image):
9-
if len(np.shape(image)) == 3 and np.shape(image)[-2] == 3:
9+
if len(np.shape(image)) == 3 and np.shape(image)[2] == 3:
1010
return image
1111
else:
1212
image = image.convert('RGB')
@@ -59,4 +59,4 @@ def get_lr(optimizer):
5959

6060
def preprocess_input(image):
6161
image /= 255.0
62-
return image
62+
return image

0 commit comments

Comments
 (0)