Trouble with matrix dimensions

row is shape[1] = nx = 64

col is shape[0] = m = 209

I need to reshape training_set_orig (209,64,64,3)

to training_set_flatten to (12288,209) This means 64 X 64 X 3=12288 cols and 209 rows?

Im used to matrix dem A = A(rows, cols) =A(64,209) so I get mixed up here

My code doesn’t work:

train_setx_flatten = train_set_x_orig.reshape(train_set_x_orig.shape[0],train_set_x_orig.shape[1]*train_set_x_orig.shape[1]*3,-1).T

test_set_x_flatten = test_set_x_orig.reshape(test_set_x_orig.shape[0],test_set_x_orig.shape[1]*test_set_x_orig.shape[1]*3,-1).T

Error message: AssertionError: Wrong solution. Use (X.shape[0], -1).T.