The layer model has never been called and thus has no defined input shape

Hi, I want to convert a Keras Model to a Nengo Network by using converter in nengo-dl.
Here is my code:
inp = tf.keras.Input(shape=(28, 28, 3))

conv = tf.keras.layers.Conv2D(filters=32, kernel_size=3, activation=tf.nn.relu)(inp)

flat = tf.keras.layers.Flatten()(conv)

dense = tf.keras.layers.Dense(units=10, activation=tf.nn.relu)(flat)

model = tf.keras.Model(inputs=inp, outputs=dense)

converter = nengo_dl.Converter(model)

And I had an error called: ---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
in <cell line: 8>()
6 model = tf.keras.Model(inputs=inp, outputs=dense)
7
----> 8 converter = nengo_dl.Converter(model)

6 frames
/usr/local/lib/python3.10/dist-packages/keras/src/engine/base_layer.py in _get_node_attribute_at_index(self, node_index, attr, attr_name)
2976 “”"
2977 if not self._inbound_nodes:
→ 2978 raise RuntimeError(
2979 f"The layer {self.name} has never been called "
2980 f"and thus has no defined {attr_name}."

RuntimeError: The layer model_2 has never been called and thus has no defined input shape.

I really have no idea how to solve this. I hope someone can give an answer to this problem. Thanks!!!