Matrix input to CNN encountered a problem, newbie, help!

II have a (2400,30) of 2400 one-dimensional arrays, I have a method to turn it into the form of (2400,16,15), and then through the interpolation method I get (2400,32,32) to fit the CNN input, and then the extended dimension is (2400,32,32,1) input to the CNN, this is my training data, my training label is the unique encoding of (6000,6), for example, the first class is 1 0 0 0 0 0 0 0, the second class is 0 1 0 0 0 0 0 , And so on, there are six of them, the first 0-599 is the first, 600-1199 is the second, and so on. The validation set is (600,30) and the data processing is the same as above. At this time, I input the processed data into the CNN for training, and the final accuracy rate is 16.67, which is one-sixth, which is equal to no training, can someone help solve the problem, thank you! :grinning: :grinning:

@woyaozhengqian50w

It looks like you’re facing an issue with your CNN training, and the accuracy is stuck around 16.67%. Here are some quick tips to help:

  1. Check Model Setup: Make sure your CNN architecture is suitable for your task, not too complex or too simple.
  2. Data Augmentation: Try applying data augmentation techniques to enhance your training set artificially.
  3. Adjust Learning Rate: Play around with the learning rate. It could be too high or too low, impacting the training process.
  4. Class Imbalance: Check if your dataset has class imbalances. It might affect your model’s ability to learn certain classes.
  5. Metrics Beyond Accuracy: Look at other metrics like precision, recall, and F1-score for a deeper insight into model performance.
  6. Experiment with Batch Sizes: Changing batch sizes during training could make a difference.
  7. Initialization and Hyperparameters: Try different weight initialization methods and experiment with hyperparameters like layer count, filter sizes, and dropout rates.
  8. Monitor Overfitting: Keep an eye on overfitting or underfitting during training.

Hope these quick tips help! Let me know how it goes.

Thank you for your answer, before I put my data into (2400,16,15) form,I saved it as a picture according to six categories,Put them in six folders,So the processing accuracy is normal,My current question is that it may be caused by the label and the data can not be corresponded to one by one when the data is incoming,I can’t check this,And when using the input method, I not only tried flow,I also tried to pass in directly without an image generator,It’s all 16.67,That’s one-sixth of the original

@woyaozhengqian50w

Thank you for providing more details. To further troubleshoot this issue:

  1. Double-check the labels associated with your data samples. Ensure they align correctly and consistently with your six categories.
  2. Review how you load the data and labels into your model. Whether using an image generator or direct loading, confirm that the pairing is accurate.
  3. Print out some sample labels and corresponding data samples to the console during the training process. This can provide real-time insights into any discrepancies.
  4. Visualize a few samples from each category to visually confirm that the images match their respective labels.

If the issue persists, consider sharing a snippet of your code related to data loading and model training. This will enable a more detailed examination. Let me know how these steps go, and we can iterate from there!