tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 695726080 values, but the requested shape has 21741440
在使用keras构建网络时,出现上述错误,原因是,在自定义层的compute_output_shape函数里,output_shape计算错误,导致实际输出和给定的输出shape不一致而报错。
本文详细解析了在使用Keras构建神经网络时遇到的TensorFlow重塑错误,指出问题源于自定义层的compute_output_shape函数中output_shape计算不当,导致实际输出与预期形状不符。
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 695726080 values, but the requested shape has 21741440
在使用keras构建网络时,出现上述错误,原因是,在自定义层的compute_output_shape函数里,output_shape计算错误,导致实际输出和给定的输出shape不一致而报错。
2784
3万+
3147
8852
1919
1490

被折叠的 条评论
为什么被折叠?