且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Keras LSTM-使用来自发生器的Tensorflow数据集API的进料序列数据

更新时间:2023-12-02 09:03:28

我认为这个答案可能与您正在寻找!

I think this answer might be close to what you are looking for!

您可以通过在窗口上滑动来创建批处理,然后根据情况改组输入.数据集api的 shuffle 函数具有reshuffle_after_each_iteration参数,如果您想尝试设置随机种子并查看随机输出的顺序,则可能需要将其设置为False.

You create batches by sliding over windows, and then shuffle the input in your case. The shuffle function of the dataset api has a reshuffle_after_each_iteration parameter, which you might probably want to set to False if you want to experiment with setting a random seed and looking at the order of shuffled outputs.