IndexError while classifieing a pricture with the trained model!

I got an IndexError while classifieing a pricture offline with the downloaded and trained dataset!

Using TensorFlow backend.
outputs will be stored at ‘./output/’

aborting due to exception… Please check input file format!
Traceback (most recent call last):
File “”, line 234, in test_model
os.path.dirname(input_file), test_raw, data_mapping)
File “”, line 105, in process_test_input
test_data[i][j] = img
IndexError: index 0 is out of bounds for axis 0 with size 0

Hi you are getting this error because the test file is not able to read the input image.
Please check the input file and the location of the input image.


Hi I am using an image from the trained dataset.
The file can locate the test image.
The image doesn’t fit into the model.

Now I am a little bit further, but get another error:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 256, in test_model
    res = customPredict(test_data, config, modelFile)
  File "", line 214, in customPredict
    mod = load_model(modelFile)
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\", line 419, in load_model
    model = _deserialize_model(f, custom_objects, compile)
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\", line 287, in _deserialize_model
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\", line 2465, in batch_set_value
    assign_op = x.assign(assign_placeholder)
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\ops\", line 1952, in assign
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\ops\", line 227, in assign
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\ops\", line 69, in assign
    use_locking=use_locking, name=name)
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\", line 788, in _apply_op_helper
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\util\", line 507, in new_func
    return func(*args, **kwargs)
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\", line 3616, in create_op
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\", line 2027, in __init__
  File "C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\", line 1867, in _create_c_op
    raise ValueError(str(e))
ValueError: Shapes must be equal rank, but are 1 and 0 for 'Assign' (op: 'Assign') with input shapes: [1], [].