Logistic Regression with a Neural Network Mindset reshape

In course 1 week 2 assignment for reshape this code works but the below code does not work. can anyone tell me why is that?

train_set_x_flatten = train_set_x_orig.reshape(train_set_x_orig.shape[0], -1).T
test_set_x_flatten = test_set_x_orig.reshape(test_set_x_orig.shape[0], -1).T

why not this—>

train_set_x_flatten = train_set_x_orig.reshape(num_pxnum_px3,m_train)
test_set_x_flatten = test_set_x_orig.reshape(num_pxnum_px3,m_test)

train_set_x shape: (209, 64, 64, 3)
train_set_y shape: (1, 209)

Hi @sunilchawla,

Welcome to discourse and thank you for sharing. This forum is related to the Practical Data Science (AWS) course :slight_smile: .
I believe your question applies to another course offered by DeepLearning.AI, right?

yes. I will post it there. Thank you