Problem with music_inference_model function

hi ,i have a problem with my music_inference_model() function especially the task 2.E,the task is mentionning using RepeatVector(1) but when i tried it,the tester is not working saying Outputs = 50
Single output shape = (None, 90)
len(pred) = 50
pred[0].shape = (1, 90)
Test failed at index 7
Expected value

[‘Lambda’, (None, 1, 90), 0]

does not match the input value:

[‘RepeatVector’, (None, 1, 90), 0, 1],it’s mentionning that it requires lambda not RepeatVecto(), i also tried to use lambda but it still mentionning the RepeatVector problem,can you help me please?

You have to use RepeatVector, not Lambda. Maybe you are making mistake in other steps. Double check the instructions one by one with your code.

i used RepeatVector but didn’t work,recarding the other steps the tests passed successfully so logically there are no problems
Can i send code?
Also the test output mentionning that the expected value is lambda :Outputs = 50
Single output shape = (None, 90)
len(pred) = 50
pred[0].shape = (1, 90)
Test failed at index 7
Expected value

[‘Lambda’, (None, 1, 90), 0]

does not match the input value:

[‘RepeatVector’, (None, 1, 90), 0, 1] so i’m confuses

To close the loop in the public thread, you don’t need to use the Lambda function. Using RepeatVector alone is sufficient.

2 Likes

Sorry, but I’m confused: the error message seems to say that Lambda is the expected value. I checked my output and there is no Lambda and I pass the comparator test. So where does that error message come from? Is Nizar using an old or different version of the notebook?

Or maybe there’s a bug in how the test is written that generates that message?

the problem is solved thank you for helping me,i was using lambda with repeatVector so that what was causing the problem thank you

Ah, yes, the test is broken:

def comparator(learner, instructor):
    if len(learner) != len(instructor):
        raise AssertionError("Error in test. The lists contain a different number of elements") 
    for index, a in enumerate(instructor):
        b = learner[index]
        if tuple(a) != tuple(b):
            print(colored(f"Test failed at index {index}", attrs=['bold']),
                  "\n Expected value \n\n", colored(f"{b}", "green"), 
                  "\n\n does not match the input value: \n\n", 
                  colored(f"{a}", "red"))
            raise AssertionError("Error in test") 
    print(colored("All tests passed!", "green"))

It reverses the role of “expected” and “actual”. I will file a bug.

2 Likes

yeah that was confusing ,i thought that repearVector is not the right fonction to put

Now the next question is why we’ve never noticed this bug in 5 years :smile:

2 Likes

maybe i am the only one who made a mistake in that easy task :downcast_face_with_sweat:

otherwise thank you for the support

No, I’m pretty sure we’ve seen other cases of incorrect models in this case. In fact, here’s another one from yesterday also …

But in that case, the graphs were a lot more different so it was less clear that the error message was incorrect.

So don’t feel bad about that. It’s happened to lots of people …

1 Like

i want to ask a question:is there any Ai engineering specialisation from deep learning Ai? because i really love your methodology of explaining things

What exactly do you mean by “AI engineering”?

Yes, Prof Ng is a genuinely great teacher. There used to be a specialization called Machine Learning Engineering for Production (MLOps), but I think it is being revised and is no longer available. I have not taken it in the past, but I believe that it is not taught by Prof Ng.

There is also a specialization about Data Engineering, but I am also not familiar with that one. Please have a look at the list of courses and see if that sounds relevant to you.

But as Tom suggests, there are lots of possible interpretations of your question. If I’m missing your point, please let us know in more detail what kind of material you are seeking.

i mean Mlops ,using docker,architect agents etc…

I just searched on Coursera and found the DLAI MLOps course, so I guess I was wrong and it still is available.

As I mentioned before, I have not taken it, so cannot offer any more information than the above.

When I searched for “machine learning engineering for operations” on Coursera, I found offerings on the subject from a number of other providers, but I also have no further information about any of them. So you would need to check their curricula and look for reviews and the like.

1 Like

thank you for allocating some of your time to help me

1 Like

An abbreviated version of the MLOPs course is still available. But it’s a lot shorter than it once was. The material had become dated and was no longer supportable.

I have no idea what the future plans are.