首页 > 解决方案 > how do I resolve an error occured during execution of LOC, how to use nb_epoch in writing code

问题描述

I am executing code to learn deep learning, I am new in this, I am executing code on Colab while executing the code

model.fit(X_train, y_train, batch_size=10, nb_epoch=100)

I got error

TypeError Traceback (most recent call last) in () ----> 1 model.fit(X_train, y_train, batch_size=10, nb_epoch=100) 2

TypeError: fit() got an unexpected keyword argument 'nb_epoch'

can anybody tell me why this error occured.

标签: python

解决方案


目前还不是很清楚您使用的是什么库,但假设您使用的是 tf.keras 参数被称为epochsnot nb_epochhttps ://www.tensorflow.org/api_docs/python/tf/keras/Model#fit


推荐阅读