# [Week 1] Jazz improvisation - exercise 2: Assertion error

I am getting an assertion error when I am making the model, this is my code: ` for t in range(Ty):
# Step 2.A: Perform one step of LSTM_cell (≈1 line)
a, _, c = LSTM_cell(x, initial_state=[a, c])

``````    # Step 2.B: Apply Dense layer to the hidden state output of the LSTM_cell (≈1 line)
out = densor(a)
# Step 2.C: Append the prediction "out" to "outputs". out.shape = (None, 90) (≈1 line)
outputs.append(out)

# Step 2.D:
# Select the next value according to "out",
# Set "x" to be the one-hot representation of the selected value
# See instructions above.
x = tf.math.argmax(out, axis=-1)
x = tf.one_hot(x, depth=n_values)
# Step 2.E:
# Use RepeatVector(1) to convert x into a tensor with shape=(None, 1, 90)
x = RepeatVector(1)(x)

# Step 3: Create model instance with the correct "inputs" and "outputs" (≈1 line)
inference_model = Model(inputs=[x, a, c], outputs=outputs)```````

Hi PartM.
I have the same assertion error.
What’s the hint you are talking about?

one of the hints was “initial inputs” which was the problem I was having.

Right.
Its a minute bug i guess. Let me recheck.
Anyways, thank you

for I in range(Ty):

``````    a, _, c = LSTM_cell(x, initial_state=[a, c])
outputs.append(densor(a))

x = tf.math.argmax(out, axis=-1)
x = tf.one_hot(x, depth=n_values)
x = RepeatVector(1)(x)
``````

inference_model = Model(inputs=[x, a, c], outputs=outputs)

Got it.
inference_model = Model(inputs=[x0, a0, c0], outputs=outputs) lol