R Keras EarlyStopping 无法将类型环境强制为整数类型的向量

问题描述

使用 R Keras 开发深度学习,我想实现提前停止回调,但显示错误Error in as.integer(verbose) : cannot coerce type 'environment' to vector of type 'integer'

R 代码

# Compiling the model
model %>% compile(loss = "categorical_crossentropy",optimizer = "adam",metrics = c("accuracy"))

history <- model %>% 
  fit(x_train,y_train,epoch = 250,batch_size = 32,callback_early_stopping(monitor = "val_loss",min_delta = 0.001,patience = 5,restore_best_weights = TRUE,verbose = 1),validation_split = 0.2
      )

知道出了什么问题吗? 谢谢。

解决方法

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

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

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