Heat map function in Lecture 7 (get_cm)


#1

I am trying to understand heat map in lecture 7. I got below queries:

  1. One of the functions defined was get_cm

     def get_cm(imp, label)
         conv = conv_fn([inp,0])[0, label]
        return scipy.misc.imresize(conv, (360,640), interp='nearest')
    

But variable “imp” is not called inside the function get_cm. Is there any mistake here?


(Christina Young) #2

Looks like a typo to me… I think it should be “inp”.


(arnaud) #3

Agreed ! The code works when like this :

def get_cm(inp, label)
    conv = conv_fn([inp,0])[0, label]
    return scipy.misc.imresize(conv, (360,640), interp='nearest')