python - 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.
解决方案
目前还不是很清楚您使用的是什么库,但假设您使用的是 tf.keras 参数被称为epochs
not nb_epoch
:https ://www.tensorflow.org/api_docs/python/tf/keras/Model#fit
推荐阅读
- php - Laravel 雄辩 - 渴望加载嵌套关系
- python - 如何使用pandas python附加for循环的所有输出
- angular - 如何通过量角器设置日期
- amazon-s3 - 使用 Java 应用程序将 Gzip 文件上传到 S3 存储桶时已损坏
- arrays - 将 numpy loadtxt 的输出作为单个数组而不是多个数组
- java - MongoDb 4.2 中的文档级别锁定
- python - Python ::: 带参数捕获异常
- javascript - Vue 将 Undefined 设置为值应为 0 或 false 的属性
- python - 具有双变量颜色图的 Altair 地图
- sql-server - 如何在 SQL Server 中连接两个 ID 不相同的表?