Doubt in reading keras dicumentation

1
In all the documentation of keras that I have come so far in the programing assignments like the ConV2D, BatchNormalization, etc I find the syntax incomplete and different from what is used in the examples and in the programming assignment. For example in the programming assignment for BatchNorm we used the following syntax :
X = BatchNormalization(axis = 3)(X, training = training)
but in the documentation, the image is a screenshot of the batch norm syntax from its documentation, where is it mentioned how to write (X, training = training)?

Please look at __call__ and not the constructor documentation.

What are call arguments?

1

We don’t define a function like this right?

In your case, (X, training = training) are arguments for __call__
Keep in mind that BatchNormalization is a class. When you invoke an instance of a class like a function, __call__ method is called.

1 Like

ok so its more complicated than I thought :sweat_smile: I guess I need more python knowledge for this.

I guess all you need is to learn a bit more Python classes. Feel free to refer to this link for an easy introduction to Python classes, and how to use them. Also, do refer to this link, which describes the special __call__ function for Python classes. I hope it helps.

Regards,
Elemento

1 Like