ValueError showing shapes are incompatible

This tutorial (https://tvm.apache.org/docs/tutorials/frontend/from_keras.html#sphx-glr-tutorials-frontend-from-keras-py) throws following error:- Traceback (most recent call last): File “from_keras.py”, line 54, in keras_resnet50.load_weights(weights_path) File “/home/santosh/.local/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py”, line 2211, in load_weights hdf5_format.load_weights_from_hdf5_group(f, self.layers) File “/home/santosh/.local/lib/python3.8/site-packages/tensorflow/python/keras/saving/hdf5_format.py”, line 708, in load_weights_from_hdf5_group K.batch_set_value(weight_value_tuples) File “/home/santosh/.local/lib/python3.8/site-packages/tensorflow/python/util/dispatch.py”, line 201, in wrapper return target(*args, **kwargs) File “/home/santosh/.local/lib/python3.8/site-packages/tensorflow/python/keras/backend.py”, line 3576, in batch_set_value x.assign(np.asarray(value, dtype=dtype(x))) File “/home/santosh/.local/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py”, line 858, in assign self._shape.assert_is_compatible_with(value_tensor.shape) File “/home/santosh/.local/lib/python3.8/site-packages/tensorflow/python/framework/tensor_shape.py”, line 1134, in assert_is_compatible_with raise ValueError(“Shapes %s and %s are incompatible” % (self, other)) ValueError: Shapes (1, 1, 256, 512) and (512, 128, 1, 1) are incompatible

I have found a similar issue on stackoverflow(https://stackoverflow.com/questions/60119041/failed-to-load-keras-resnet50-model-offline-using-weight-file) which says change the (weights =‘imagenete’ ) I did that but it still gives me the same error(ValueError: Shapes (1, 1, 256, 512) and (512, 128, 1, 1) are incompatible)

what should I do?