Question 3
In the class, we saw the UDF for mobilenet_v2. Specifically, the predict() function contained the below lines of code
They check the syntax of the model function so that there are no errors
They load the model into memory so that the loop iteration over each image does not need to do the same operation again and again given model load times are prohibitively expensive for DL models
They invoke PyTorch libraries that have already been setup for model scoring on GCP using APIs embedded within the function
They are Map-style UDFs that make it an embarrassingly parallel computation thus making the execution parallelized and fast.