Week 2 ResNet50 'Tensor' object is not callable

The error is pointed to Stage 2 of the ResNet50 model, which is provided by the course. How can I correct it?

TypeError Traceback (most recent call last)
in
----> 1 model = ResNet50(input_shape = (64, 64, 3), classes = 6)
2 print(model.summary())

in ResNet50(input_shape, classes)
30
31 # Stage 2
—> 32 X = convolutional_block(X, f = 3, filters = [64, 64, 256], s = 1)(X)
33 X = identity_block(X, 3, [64, 64, 256])(X)
34 X = identity_block(X, 3, [64, 64, 256])(X)

TypeError: ‘Tensor’ object is not callable

convolutional_block is the function that you wrote in this assignment, is a function, not a tensorflow/keras layer class. If you look your implementation closer, you are passing “X” twice. Again, convolutional_block is a function that you created. Just passing X as a parameter is fine.

Thank you! I just realized it. I used it as a keras layer. The problem is addressed.