正如您从本教程 ( https://www.tensorflow.org/tutorials/structured_data/time_series ) 中看到的那样,我正在研究时间序列的预测。
我想问一下教程第 4 节中 tf.keras.preprocessing.timeseries_dataset_from_array 中的批量大小与 model.fit 中的批量大小之间的区别。如果这两个参数相同,那么如果我也在 model.fit 中写入批量大小会发生什么?
谢谢你。
正如您从本教程 ( https://www.tensorflow.org/tutorials/structured_data/time_series ) 中看到的那样,我正在研究时间序列的预测。
我想问一下教程第 4 节中 tf.keras.preprocessing.timeseries_dataset_from_array 中的批量大小与 model.fit 中的批量大小之间的区别。如果这两个参数相同,那么如果我也在 model.fit 中写入批量大小会发生什么?
谢谢你。
从model.fit
位于此处的文档中。
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