Model compiles but run aborts

C2W2:
My model compiles fine. But when I run the model I get “boundary mode not supported”. An answer on StackExchange suggests that validation_generator may have a problem, but I can’t see one…

See below:

RuntimeError                              Traceback (most recent call last)

<ipython-input-22-4fd84b04e1cf> in <module>
      7                     epochs=15,
      8                     verbose=1,
----> 9                     validation_data=validation_generator)

2 frames

/usr/local/lib/python3.7/dist-packages/scipy/ndimage/_ni_support.py in _extend_mode_to_code(mode)
     52         return 6
     53     else:
---> 54         raise RuntimeError('boundary mode not supported')
     55 
     56 

RuntimeError: boundary mode not supported

Error output in more detail:

RuntimeError Traceback (most recent call last)
in
9 epochs=15,
10 verbose=1,
—> 11 validation_data=validation_generator)

2 frames
/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py in error_handler(*args, **kwargs)
65 except Exception as e: # pylint: disable=broad-except
66 filtered_tb = _process_traceback_frames(e.traceback)
—> 67 raise e.with_traceback(filtered_tb) from None
68 finally:
69 del filtered_tb

/usr/local/lib/python3.7/dist-packages/scipy/ndimage/interpolation.py in affine_transform(input, matrix, offset, output_shape, output, order, mode, cval, prefilter)
572 npad = 0
573 filtered = input
→ 574 mode = _ni_support._extend_mode_to_code(mode)
575 matrix = numpy.asarray(matrix, dtype=numpy.float64)
576 if matrix.ndim not in [1, 2] or matrix.shape[0] < 1:

/usr/local/lib/python3.7/dist-packages/scipy/ndimage/_ni_support.py in _extend_mode_to_code(mode)
52 return 6
53 else:
—> 54 raise RuntimeError(‘boundary mode not supported’)
55
56

RuntimeError: boundary mode not supported

Did you misspell the fill_mode parameter value?

1 Like

Just a capitalisation of the keyword. Not clear how it passed the test unless it somehow called the function but only executed in a limited way. The ultimate error at runtime was reported from scikit so somehow the test didn’t pass it that far :thinking:

Anyway, thanks!