Some of us faced the similar problem and its discussed in this message: Course 1 week 2: bias 'b' value type in model vs initialize_with_zeros
Primarily, in model, we need to update the value of b and w in d(return value) as
"w" : params["w"], # from ("w": w)
"b" : params["b"], # from("b": b)
Or assign
w, b = params["w"], params["b"]
I think, this change is needed to return the learned weights and biases to the model inference.