Locally connected network Locally connected network weight matrix generator for 1D and 2D input matrix. The shape of the resulting matrix is W = (input_size, hidden_size) for both methods. note: input_size > hidden_size