简体   繁体   中英

Why does scikit neural network reshape my input array automatically?

When I pass my training data to the scikit neural network it is a NumPy array of all my 24*24 image matrices. I check and this is the shape of the data: (3237, 24, 24) - 3237 24*24 images.

However, once I feed it into the neural network, I get this warning:

WARNING:sknn: - Reshaping input array from (3237, 24, 24) to (2589, 24, 24, 1).

The program still runs, I just don't understand why it is reshaping my array.

Looking at the source, scikit will reshape input arrays if the X (input samples) you pass in when initializing is a different size from creating/splitting the dataset in the MLP backend. This is to reduce overfitting by training and validating on the same samples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM