ValueError:仅对等级> = 1支持对张量进行分批处理

时间:2019-04-07 15:28:51

标签: tensorflow machine-learning

1 个答案:

答案 0 :(得分:0)

就我而言,该错误是由于以下原因引起的:

my_feature = california_housing_dataframe["total_rooms"]

进入:

ds = Dataset.from_tensor_slices((features, targets))

解决方案是通过:

my_feature = california_housing_dataframe[["total_rooms"]]