Week#2 Exercise 1 - identity_block Error: 'Input has undefined rank:', TensorShape(None)

They give you an example of what the BatchNorm call looks like in the template code. Yours should look the same. It looks like you have not supplied an input argument to the Conv2D call in the “Second Component”. There again, they gave you an example in the “First Component”. Your Conv2D layer should be the same, but you need to adjust the filter, kernel size, stride and padding. Other than that, the way the input works is the same. We are doing the Keras Functional API here with the “layer” functions, so there are two layers of inputs: the first set of parameters define the layer characteristics and that returns the actual function that you call with an input tensor. They don’t give much useful documentation in the notebooks, other than the sample code. Here’s a thread that goes into more detail about the Sequential and Functional APIs.

1 Like