CNN W1 A1 problem with shape

def conv_forward(A_prev, W, b, hparameters):
“”"
Implements the forward propagation for a convolution function

Arguments:
A_prev -- output activations of the previous layer, 
    numpy array of shape (m, n_H_prev, n_W_prev, n_C_prev)
W -- Weights, numpy array of shape (f, f, n_C_prev, n_C)
b -- Biases, numpy array of shape (1, 1, 1, n_C)
hparameters -- python dictionary containing "stride" and "pad"
    
Returns:
Z -- conv output, numpy array of shape (m, n_H, n_W, n_C)
cache -- cache of values needed for the conv_backward() function
"""

# Retrieve dimensions from A_prev's shape (≈1 line)  
# (m, n_H_prev, n_W_prev, n_C_prev) = None

# Retrieve dimensions from W's shape (≈1 line)
# (m, n_H_prev, n_W_prev, n_C_prev) = None

(this is the code in the assignment that was visable)

It states that W – Weights, numpy array of shape (f, f, n_C_prev, n_C)

but then later refers in the hint to code for W shape

Retrieve dimensions from W’s shape (≈1 line)

(m, n_H_prev, n_W_prev, n_C_prev) = None

and defining W.shape using (m, n_H_prev, n_W_prev, n_C_prev) gave a wrong output, is there a problem with the assignment or am i misunderstanding anything? the assignment passed when i used (f,f n_C_prev, n_C)

That is not what that comment looks like in my notebook, so you must have modified it. You can get a fresh copy of the notebook using the first topic on the DLS FAQ Thread and compare to what you are seeing.

I have this pre-written code:

# Retrieve dimensions from A_prev's shape (≈1 line)
# (m, n_H_prev, n_W_prev, n_C_prev) = None

# Retrieve dimensions from W's shape (≈1 line)
# (f, f, n_C_prev, n_C) = None

You are using A_prev’s dimension to retrieve the shape of W.