原文:ValueError: Error when checking input: expected input_1 to have 2 dimensions, but got array with shape (100, 100, 100, 3)

原文鏈接:http: www.one know.cn bug 報錯 原因 輸入第一層的張量與數據集的shape不同 解決 將data轉置: data data.reshape len data , 然后會報錯: 再把shape按照提示改正: inputs Input shape , ...

2019-07-08 16:19 0 3060 推薦指數:

查看詳情

標記編碼報錯ValueError: bad input shape ()

《Python機器學習經典實例》2.9小節中,想自己動手實踐汽車特征評估質量,所以需要對數據進行預處理,其中代碼有把字符串標記編碼為對應的數字,如下代碼 報錯: 所以由此看出,是label_encoder[i].transform(input_data[i])中 ...

Tue Jan 09 05:04:00 CST 2018 0 2907
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM