train_set_x_flatten = train_set_x_orig.reshape((3*(num_px**2)), train_set_x_orig.shape[0])# Shape: (num_pxnum_px3, m_train)
test_set_x_flatten = test_set_x_orig.reshape((3*(num_px**2)), test_set_x_orig.shape[0]) # Shape: (num_pxnum_px3, m_test)
VS
train_set_x_flatten = train_set_x_orig.reshape(train_set_x_orig.shape[0], -1).T # Shape: (num_pxnum_px3, m_train)
test_set_x_flatten = test_set_x_orig.reshape(test_set_x_orig.shape[0], -1).T # Shape: (num_pxnum_px3, m_test)
The code written first is the one which i wrote but somehow the answer i got wasn’t correct viz the correct reshaped matrix. Can anyone explain why??
go to the reshaping function (Exercise 2 ).
Regards