C4W3 assignment 2 what is represented by "axis=3"?

Hi there:
In " upsampling_block" what does axis=3 represent in this context:
merge = concatenate([up, contractive_input], axis=3)
Thanks,
Doron

Please move this topic to the right subcategory. Here’s the community user guide to get started.

You seem to have a pattern of posting questions about DLS C4 under DLS C2. I moved it for you.

Have you read the documentation for TF concatenate? The point of the call is that you have two tensors and you want to stack them together. That requires that you stack them along one axis and that they must have the same shape on all the other axes in order for that to work. You can see that by considering the trivial case of 2D matrices and how you can vertically or horizontally concatenate them.

So axis = 3 would be the fourth axis in this case, because indexing in python is 0-based. So what is the meaning of the axes of the images that we are dealing with here? They are:

samples x height x width x channels

right? So we are concatenating them along the channels axis.

1 Like

Thank you. (And sorry for the confusion in posting under a wring category. I might have not seen well.)