【发布时间】:2018-12-03 13:35:02
【问题描述】:
这是我的代码:
test_image = image.load_img('dataset/single_prediction/cat_or_dog_1.jpg', target_size = (64, 64))
test_image = image.img_to_array(test_image)
test_image = np.expand_dims(test_image, axis = 0)
result = classifier.predict(test_image)
training_set.class_indices
if result[0][0] == 1:
prediction = 'dog'
else:
prediction = 'cat' `
我有这样的错误:
File "<ipython-input-31-35ebf5fa8bf7>", line 7
prediction = 'dog'
^
IndentationError: expected an indented block
谁能帮帮我?
【问题讨论】:
标签: python machine-learning conv-neural-network