# Test failed at index 1 Expected value \['SlicingOpLambda', (None, 90), 0\]

**URL:** <https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139>\
**Category:** Sequence Models\
**Tags:** coursera-platform\
**Created:** [July 20, 2021, 3:27am UTC](https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139 "2021-07-20T03:27:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kennychuen](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@Kennychuen](https://dlai.staged-by-discourse.com/u/Kennychuen)\
**Post date:** [July 20, 2021, 3:27am UTC](https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139/1 "2021-07-20T03:27:13Z")

</div>

Hello, I downloaded the notebook for Week 1 assignment 3 into my laptop and run it but the error arises as seen below. I did 100/100 for the grader output. I am not sure why this is happening.

# UNIT TEST

output = summary(model)  
comparator(output, djmodel\_out)

Test failed at index 1  
Expected value

[‘SlicingOpLambda’, (None, 90), 0]

does not match the input value:

## [‘TensorFlowOpLayer’, [(None, 90)], 0]

AssertionError Traceback (most recent call last)  
 in   
1 # UNIT TEST  
2 output = summary(model)  
----\> 3 comparator(output, djmodel\_out)

~/Desktop/Python/Deep Learning Specialisation/5-Sequence Models/test\_utils2.py in comparator(learner, instructor)  
26 “\n\n does not match the input value: \n\n”,  
27 colored(f"{a}", “red”))  
—\> 28 raise AssertionError(“Error in test”)  
29 print(colored(“All tests passed!”, “green”))  
30

AssertionError: Error in test

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/tmosh/32/9321_2.png) [@TMosh](https://dlai.staged-by-discourse.com/u/TMosh)\
**Post date:** [July 20, 2021, 4:08am UTC](https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139/2 "2021-07-20T04:08:20Z")

</div>

Are you trying to run the notebooks locally on your computer, instead of using the Coursera platform?

---

<div class="post-metadata">

**Author:** ![Kennychuen](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@Kennychuen](https://dlai.staged-by-discourse.com/u/Kennychuen)\
**Post date:** [July 20, 2021, 4:35am UTC](https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139/3 "2021-07-20T04:35:28Z")

</div>

Yes i am. I hope to utilise what i learnt here on my local laptop too. But it doesn’t seem to operate as per coursera’s environment

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/tmosh/32/9321_2.png) [@TMosh](https://dlai.staged-by-discourse.com/u/TMosh)\
**Post date:** [July 20, 2021, 5:02am UTC](https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139/4 "2021-07-20T05:02:19Z")

</div>

Sorry, I don’t have any experience with that.

---

<div class="post-metadata">

**Author:** ![henrikh](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@henrikh](https://dlai.staged-by-discourse.com/u/henrikh)\
**Post date:** [June 22, 2022, 4:20pm UTC](https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139/5 "2022-06-22T16:20:15Z")

</div>

Those tests do not necessarily mean you won’t be able to reproduce Jazz music. I had the same error but was able to generate music.  
I guess the issue is the different versions of python libraries installed on Coursera.  
For instance, I usually get the warning

serWarning: The `lr` argument is deprecated, use `learning_rate` instead.  
super(Adam, self). **init** (name, \*\*kwargs)

Changing it to “learning\_rate” removes the warning.

So, even without “All tests passed!” your code could serve its purpose.

Hope this helps  
Henrikh

---

<div class="post-metadata">

**Author:** ![Felipe\_Caballero](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/felipe_caballero/32/19570_2.png) [@Felipe\_Caballero](https://dlai.staged-by-discourse.com/u/Felipe_Caballero)\
**Post date:** [November 21, 2022, 8:00pm UTC](https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139/6 "2022-11-21T20:00:25Z")

</div>

I struggled a bit with this issue… but @TMosh 's question about using a local environment versus Coursera’s made me check on the cloud vs my computer’s output.

‘SlicingOpLambda’ is what I get locally and ‘TensorFlowOpLayer’ is what is expected. I guess this has to do with different TensorFlow versions, I’m using tensorflow-macos==2.10.0 and on the Coursera I believe is 2.6 or something else…

On Coursera’s environment all tests pass.

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://dlai.staged-by-discourse.com/u/paulinpaloalto)\
**Post date:** [March 11, 2025, 7:32pm UTC](https://dlai.staged-by-discourse.com/t/test-failed-at-index-1-expected-value-slicingoplambda-none-90-0/22139/7 "2025-03-11T19:32:20Z")

</div>

Closed on March 11, 2025, 7:32pm UTC


