ValueError: Shapes must be equal rank, but are 1 and 0 for 'Assign' (op: 'Assign') with input shapes: [1], []

I want to classify images offline, but got this error:

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

C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your InputLayer call to the Keras 2 API: InputLayer(batch_input_shape=[None, 1, ..., sparse=False, name="Input_1", dtype="float32")
return cls(**config)
WARNING: Logging before flag parsing goes to stderr.
W0915 17:10:22.718152 10884 deprecation_wrapper.py:119] From C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your AveragePooling2D call to the Keras 2 API: AveragePooling2D(pool_size=[2, 2], trainable=True, strides=[2, 2], name="AveragePooling2D_1", padding="valid", data_format="channels_first")
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your AveragePooling2D call to the Keras 2 API: AveragePooling2D(pool_size=[2, 2], trainable=True, strides=[2, 2], name="AveragePooling2D_2", padding="valid", data_format="channels_first")
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your BatchNormalization call to the Keras 2 API: BatchNormalization(epsilon=0.001, gamma_regularizer=None, beta_regularizer=None, trainable=True, name="BatchNormalization_1", momentum=0.99, axis=1)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(trainable=True, activity_regularizer=None, name="Convolution2D_1", activation="relu", kernel_size=(8, 8), filters=32, strides=[1, 1], padding="same", data_format="channels_first", kernel_initializer="glorot_uniform", kernel_regularizer=None, bias_regularizer=None, kernel_constraint=None, bias_constraint=None, use_bias=True)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(trainable=True, activity_regularizer=None, name="Convolution2D_4", activation="relu", kernel_size=(3, 3), filters=32, strides=[1, 1], padding="valid", data_format="channels_first", kernel_initializer="glorot_uniform", kernel_regularizer=None, bias_regularizer=None, kernel_constraint=None, bias_constraint=None, use_bias=True)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your MaxPooling2D call to the Keras 2 API: MaxPooling2D(pool_size=[2, 2], trainable=True, strides=[2, 2], name="MaxPooling2D_1", padding="valid", data_format="channels_first")
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Dropout call to the Keras 2 API: Dropout(name="Dropout_1", trainable=True, rate=0.25)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(trainable=True, activity_regularizer=None, name="Convolution2D_2", activation="relu", kernel_size=(3, 3), filters=64, strides=[1, 1], padding="same", data_format="channels_first", kernel_initializer="glorot_uniform", kernel_regularizer=None, bias_regularizer=None, kernel_constraint=None, bias_constraint=None, use_bias=True)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(trainable=True, activity_regularizer=None, name="Convolution2D_3", activation="relu", kernel_size=(3, 3), filters=64, strides=[1, 1], padding="valid", data_format="channels_first", kernel_initializer="glorot_uniform", kernel_regularizer=None, bias_regularizer=None, kernel_constraint=None, bias_constraint=None, use_bias=True)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your MaxPooling2D call to the Keras 2 API: MaxPooling2D(pool_size=[2, 2], trainable=True, strides=[2, 2], name="MaxPooling2D_2", padding="valid", data_format="channels_first")
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Dropout call to the Keras 2 API: Dropout(name="Dropout_2", trainable=True, rate=0.25)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Dense call to the Keras 2 API: Dense(trainable=True, activity_regularizer=None, input_dim=53824, name="Dense_1", activation="relu", units=512, kernel_initializer="glorot_uniform", kernel_regularizer=None, bias_regularizer=None, kernel_constraint=None, bias_constraint=None, use_bias=True)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Dropout call to the Keras 2 API: Dropout(name="Dropout_3", trainable=True, rate=0.5)
return cls(**config)
C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\base_layer.py:1109: UserWarning: Update your Dense call to the Keras 2 API: Dense(trainable=True, activity_regularizer=None, input_dim=512, name="Dense_2", activation="softmax", units=3, kernel_initializer="glorot_uniform", kernel_regularizer=None, bias_regularizer=None, kernel_constraint=None, bias_constraint=None, use_bias=True)
return cls(**config)
W0915 17:10:22.745155 10884 deprecation_wrapper.py:119] From C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:245: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

W0915 17:10:22.745155 10884 deprecation_wrapper.py:119] From C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.

W0915 17:10:22.745155 10884 deprecation_wrapper.py:119] From C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:181: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

W0915 17:10:22.746154 10884 deprecation_wrapper.py:119] From C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:186: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2019-09-15 17:10:22.746517: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
W0915 17:10:22.753155 10884 deprecation_wrapper.py:119] From C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:3980: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead.

W0915 17:10:22.963172 10884 deprecation_wrapper.py:119] From C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:3976: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

W0915 17:10:22.972172 10884 deprecation.py:506] From C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
aborting due to exception… Please check input file format!
Traceback (most recent call last):
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\ops.py”, line 1864, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shapes must be equal rank, but are 1 and 0 for ‘Assign’ (op: ‘Assign’) with input shapes: [1], [].

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “test.py”, line 254, in test_model
res = customPredict(test_data, config, modelFile)
File “test.py”, line 212, in customPredict
mod = load_model(modelFile)
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\saving.py”, 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\saving.py”, line 287, in _deserialize_model
K.batch_set_value(weight_value_tuples)
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py”, 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\variables.py”, line 1952, in assign
name=name)
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\ops\state_ops.py”, line 227, in assign
validate_shape=validate_shape)
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\ops\gen_state_ops.py”, 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\op_def_library.py”, line 788, in _apply_op_helper
op_def=op_def)
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\util\deprecation.py”, line 507, in new_func
return func(*args, **kwargs)
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\ops.py”, line 3616, in create_op
op_def=op_def)
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\ops.py”, line 2027, in init
control_input_ops)
File “C:\Users\Florian\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\ops.py”, 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], [].