C1_W4 Assignment - Conv2D_0 layer

Hi, I don’t understand how to call Conv2d_0 layer. I just assign “vars(self)[f’conv2D_{0}']” to the conv2d_0 variable, but I know this implementation is wrong. I also don’t understand the vars concept and why did we do it. Can somebody explain these two things in a little bit detail please? Thank You

Maybe this page can be helpful to you:

Can you explain this error please?/

Literally the error means that you are trying to use a list as a function i.e. list(5) instead of list[5]. But you are getting this error because you are using self. for x=…

You already defined conv_2D in the line above using self. now you can call it without self.

I tried that too, but I still got the same error. Can you confirm if conv2D_0 = vars(self)['conv2D_0'] implementation is correct or not? If not, then please explain how to implement this

I’ve got it now. I was making a mistake in the init function. Thanks for your help

1 Like