While having a look at some deep-learning code in Python, I came across some below lines of code. I am not sure what it does. I have never saw such assignments in python untill now. Can someone help me understand it?
top_model = GlobalAveragePooling2D()(x)
What does the above line of code do? Why the 2 () concatenated? It is very similar to object casting in Java. What are such assignments called in Python?
()is to call stuff. This means thatGlobalAveragePooling2D()in itself returns something that is callable, which gets called with thexargument