ValueError: Tensor Tensor ("density_2 / Softmax: 0", shape = (?, 36), dtype = float32) не является элементом этого графика. - PullRequest
0 голосов
/ 13 июля 2020

Я уже обучаю модель, но когда я пытаюсь идентифицировать изображение, появляется ошибка вроде заголовка

def identify(image):
# result = platfinder(image)
# print('platfinder : ',result)
# image = 'plates/plate.jpg'
# print(image)
segmentation(image)
# print('segmentation : ')
imgSegmen = []
for img in os.listdir('charimg'):
# try:
    #manggil data
    image = cv2.imread(os.path.join('charimg',img),cv2.IMREAD_GRAYSCALE)
    # print(image.shape)
    imgSegmen.append(image)

imgSegmen = np.array(imgSegmen).reshape(-1,28,28,1)
print('ukuran',imgSegmen.shape)

with tf.Graph().as_default():
    results = loaded_model.predict(imgSegmen)

return results
...