【TensorFlow】ValueError: 'validation_split' is only supported for Tensors or NumPy arrays

算例:『Analyzing Models with TensorBoard - Deep Learning with Python, TensorFlow and Keras p.4 - YouTube』

⚠ 执行 model.fit(X, y, batch_size=32, epochs=3, validation_split=0.3, callbacks=[tensorboard]) 时报错:


 解决方法参考该答案,将 y 转换为 numpy array 即可。

posted @ 2021-11-04 15:56  harman-chen  阅读(965)  评论(0编辑  收藏  举报