Reshaping the data using -1 index?

In the stochastic gd example, why have we used x.reshape((-1,)) ?

1 Like

this is used to automatically reshape the multi-dimensional array into one dimensional array . “-1” is used to automatically find the right number for single dimension and blank after comma represents that it is to be reshaped into single dimension array . I hope i could clear it as i am a student like you :stuck_out_tongue:

1 Like