  In modern industrial systems, diagnosing faults in time and using the best
methods becomes more and more crucial. It is possible to fail a system or to
waste resources if faults are not detected or are detected late. Machine
learning and deep learning have proposed various methods for data-based fault
diagnosis, and we are looking for the most reliable and practical ones. This
paper aims to develop a framework based on deep learning and reinforcement
learning for fault detection. We can increase accuracy, overcome data
imbalance, and better predict future defects by updating the reinforcement
learning policy when new data is received. By implementing this method, we will
see an increase of $3\%$ in all evaluation metrics, an improvement in
prediction speed, and $3\%$ - $4\%$ in all evaluation metrics compared to
typical backpropagation multi-layer neural network prediction with similar
parameters.
