在Keras R中执行Carvana Unet示例的适合发电机错误

时间:2018-09-05 20:56:53

标签: r keras rstudio

我正在尝试运行RStudio keras github分发的Carvana unet代码,该代码最初是由A. Ogurtsov在Kaggle颁布的。我正在使用python2.7运行Ubuntu 16.04。

使用以下代码拟合模型时出现错误:

model %>% fit_generator(
  train_iterator,
  steps_per_epoch = as.integer(length(train_index) / batch_size), 
  epochs = epochs, 
  validation_data = val_iterator,
  validation_steps = as.integer(length(val_index) / batch_size),
  verbose = 1,
  callbacks = callbacks_list
)

错误和详细的回溯如下:

Error occurred in generator: task 1 failed - "missing value where TRUE/FALSE needed"
Epoch 1/30
Error occurred in generator: task 1 failed - "missing value where TRUE/FALSE needed"
Error in py_call_impl(callable, dots$args, dots$keywords) : 
  StopIteration: 

Detailed traceback: 
  File "/home/user/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/home/user/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/keras/engine/training.py", line 1415, in fit_generator
    initial_epoch=initial_epoch)
  File "/home/user/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/keras/engine/training_generator.py", line 177, in fit_generator
    generator_output = next(output_generator)
  File "/home/user/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/keras/utils/data_utils.py", line 785, in get
    raise StopIteration()

关于我从哪里开始解决这个问题的任何建议?

0 个答案:

没有答案