Homework Q4


#1

How are supposed to compute ‖𝐴𝐡𝑖‖^2 with mxnet gluon vs. Python? Is (1) supposed to be with mxnet gluon and (2) with Python/NumPy?

Also, do you guys use for loops for (1)? It takes me an insanely long time and kills my kernel,


#2

Check section 2.1.6. Mutual Transformation of NDArray and NumPy.

It only took me less than 30s to run on CPU.


#3

now I feel like I must be doing something wrong…
mine only took 0.5s on CPU


#4

It probably takes so long if you convert everything to NumPy / Python one variable at a time. Stay in Gluon land as long as possible.