tensosflow.keras.Sequential 的 fit() 函数总结

本文总结了TensorFlow.keras.Sequential模型的fit()函数,详细解释了其参数用法,包括训练数据x、标签y、批次大小、周期数、验证数据等,旨在帮助理解如何使用该函数进行深度学习模型的训练。
摘要由CSDN通过智能技术生成

def fit(self,
x=None,
y=None,
batch_size=None,
epochs=1,
verbose=1,
callbacks=None,
validation_split=0.,
validation_data=None,
shuffle=True,
class_weight=None,
sample_weight=None,
initial_epoch=0,
steps_per_epoch=None,
validation_steps=None,
validation_freq=1,
max_queue_size=10,
workers=1,
use_multiprocessing=False,
**kwargs):
“”"Trains the model for a fixed number of epochs (iterations on a dataset).

***# Arguments
    x: Input data. It could be:
        - A Numpy array (or array-like), or a list of arrays
          (in case the model has multiple inputs).
        - A dict mapping input names to the corresponding
          array/tensors, if the model has named inputs.
        - A generator or `keras.utils.Sequence` returning
          `(inputs, targets)` or `(inputs, targets, sample weights)`.
        - None (default) if feeding from framework-native
          tensors (e.g. TensorFlow data tensors).
    y: Target data. Like the input data `x`,
        it could be either Numpy array(s), framework-native tensor(s),
        list of Numpy arrays (if the model has multiple outputs) or
        None (default) if feeding from framework-native tensors
        (e.g. TensorFlow data tensors).
        If output layers in the model are named, you can also pass a
        dictionary mapping output names to Numpy arrays.
        If `x` is a generator, or `keras.utils.Sequence` instance,
        `y` shoul
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值