Code Cell UNQ_C1: Function ‘djmodel’ is correct.
Code Cell UNQ_C2: Function ‘music_inference_model’ is correct.
Code Cell UNQ_C3: Unexpected error (ValueError('operands could not be broadcast together with shapes (90,90) (13,90) ')) occurred during function check. We expected function predict_and_sample to return Test 3 failed. Please check that this function is defined properly.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.
The test typically checks the output of your function, and from the message I believe there was a shape mismatch in one of your outputs. Please do a check to make sure your function outputs the right shape for both results and indices, and feel free to share the shapes here if you would like to. The correct value for Ty could be found in the assignment.
Just a thought …
I come from the Lisp-era AI days (few springs followed by a few winters). I would say our work in those days gave rise to many beautiful software and design tools (emacs, repl, smalltalk, OO, programming environments, IDE, etc.). There was a strong culture of building frameworks - problem and domain specific frameworks. Invariably one would see research papers devoting a lot of ink to describing their domain level abstractions - concepts, operations. The idea being that in building complex (and presumably AI being complex) applications a developer should be free to think in terms of the vocabulary of the problem (the domain) and not the nuts and bolts of the language. And Lisp with its prgram-is-data and data-is-program metaphor enabled creation of such domain specific vocabulary, algebra, etc.
It seems that in deep learning, at least with Python we should not have to worry about shapes of arrays. In fact we should not have to worry at all about how the concept of tensor (a multi-dimensional feature vector) is realized in a programming language. We should be able to program/develop at the level of deep-learning vocabulary – something that is defined in lectures and sits a few levels above any programming language realization.
Is that a wrong expectation? Are there frameworks which make it relatively easier for developers to do more of “deep learning and AI” and less of chasing array shapes (axis values, keepdims etc.)
Thanks for sharing it! I did some searches for “Lisp”, “program-is-data”, Lisp code examples to try to understand what it is about - [123 … ].
I think there is nothing wrong about the expectation. For example, Python frees us from memory management that we need to do in C++. It certainly lets us focus more on implementing an algorithm. Most of the time I think it is a good thing (until I need to investigate a memory leak)!
This is how I see it. There is a trade-off. More details we are exposed to, more control we have, and consequently more flexibility. As a very hot and vibrant research field, I think deep learning needs flexibility. But could we have a even more symbolic language side-by-side C++ and Python for efficiently programming known deep learning algorithms? Why not? However, if my friend asks me which language - Python or the more symbolic one? - to learn without any other points of consideration, I am going to answer Python unless the other language has a community as big, and unless the other language gives me sufficient control if not the same amount of control as Python. We need a big community so that at least it can catch up with the latest development. We need sufficient control to do something that we want but unexpected by the creators…
I kept saying “the other language” because I do not know if there exists such a language, so I do not know if there are such frameworks that you asked about in your last question. However, if there is such a language, I think I should know about it too. We know there are products that provides a graphical-based programming interface so that users can build (e.g.) a data pipeline by dragging icons and connecting them. I heard of a company that wants to build, again, graphical interface to let its product users to build and train known machine learning models. I think the intention is clear - users’ input is needed for the product to catch up with the market needs.