Tips:
- Look at the data
- Human Baseline: Can a human can predict the Y label, if human can't it will be tough for a machine to do so.
- Do exploratory data analysis
- Missing data
- Outliers
- Imbalanced data
- Data features correlation
- Start Simple
- Start with a simple baseline model
- Try adding features and layers unless it overfits on a small sample of data (manually hand written easy-to-learn data)
- Train and validate on same data
- Assumption is if the model can't learn a small amount of data, how can it learn a lot of data
- When overfitted add the extra data
- And add more features or layers to increase performance on the whole daya
- Add Regularization when model starts Overfitting
- Test each part part by part, test dataloader, test each of the model part with some custom data and finally run through the whole model
- Use
model.summary()
or model.plot()
to check layer output shapes, network connection.
- Check model layer initialization
- Look for exploding or vanishing gradient
- Deep Learning fails silently
References
- Keras Debugging Tips
- Google Developer Course
- Andrej Karpathy