ValueError: x and y must have same first dimension, but have shapes (100,) and (1,)

在学习实现Kaggle比赛预测房价时,出现以下代码报错:
ValueError: x and y must have same first dimension, but have shapes (100,) and (1,)_第1张图片
意思是:ValueError: x 和 y 的第一个维度必须相同,但形状分别为 (100,) 和 (1,)
代码检查没问题,这种一般是对齐出现了错误
ValueError: x and y must have same first dimension, but have shapes (100,) and (1,)_第2张图片
返回的值在第一个循环和第二个循环是完全不一样的维度。
经过修改:ValueError: x and y must have same first dimension, but have shapes (100,) and (1,)_第3张图片
ValueError: x and y must have same first dimension, but have shapes (100,) and (1,)_第4张图片

你可能感兴趣的:(深度学习,python,深度学习)