我试图使用 fit 函数拟合模型,但它导致 None Type Attribute 错误

问题描述

这是代码部分

#Compililng the model
opt = Adam(lr = INIT_LR,decay = INIT_LR/ EPOCHS)
model = model.compile(loss = "binary_crossentropy",optimizer = opt,metrics = ["accuracy"])

#training the head network
H = model.fit(aug.flow(trainX,trainY,batch_size = BS),steps_per_epoch = len(trainX)// BS,validation_data=(testX,testY),validation_steps = len(testX)//BS,epochs = EPOCHS)

这是我运行这段代码时发生的错误

AttributeError: 'nonetype' object has no attribute 'fit'

我可能做错了什么?请帮忙

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)