【发布时间】:2020-02-03 08:24:28
【问题描述】:
我在 keras 中有一个表现良好的神经网络。现在随着 Tensorflow 2 的弃用,我不得不重写模型。现在它给了我更差的准确性指标。
我怀疑 tf2 希望你使用他们的数据结构来训练模型,他们举了一个例子来说明如何从 Numpy 转到 tf.data.Dataset here。
所以我做到了:
train_dataset = tf.data.Dataset.from_tensor_slices((X_train_deleted_nans, y_train_no_nans))
train_dataset = train_dataset.shuffle(SHUFFLE_CONST).batch(BATCH_SIZE)
一旦训练开始,我就会收到以下警告错误:
2019-10-04 23:47:56.691434: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Out of range: End of sequence
[[{{node IteratorGetNext}}]]
【问题讨论】:
-
我也遇到了这个错误。我在 Github (github.com/tensorflow/tensorflow/issues/32817) 上读到,这是一个已修复的错误,但又回来了。
-
谢谢我刚刚在那儿发帖
标签: python-3.x tensorflow tensorflow-datasets tensorflow2.0 tf.keras