我正在研究一个加利福尼亚住房价格问题的示例项目,并且在训练模型时遇到了错误。
答案 0 :(得分:0)
就我而言,该错误是由于以下原因引起的:
my_feature = california_housing_dataframe["total_rooms"]
进入:
ds = Dataset.from_tensor_slices((features, targets))
解决方案是通过:
my_feature = california_housing_dataframe[["total_rooms"]]