正如您从本教程 (https://www.tensorflow.org/tutorials/structured_data/time_series) 中看到的那样,我正在研究时间序列的预测。
我想问一下教程第 4 节中 tf.keras.preprocessing.timeseries_dataset_from_array 中的批量大小与 model.fit 中的批量大小之间的差异。如果这两个参数相同,那么如果我也在 model.fit 中写入批量大小会怎样?
谢谢。
最佳答案
来自 model.fit
的文档,位于 here.
batch_size: Integer or None. A number of samples per gradient update. If unspecified,
batch_size will default to 32.
Do not specify the batch_size if your data is in the form of datasets, generators,
or keras. utils.Sequence instances (since they generate batches).
所以不要在model.fit
中指定batch size
关于tensorflow - "batch size in tf.keras.preprocessing.timeseries_dataset_from_array"和 "batch size in model.fit"有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67287240/