The storage tank is one of the components of the oil and gas industry that is used as a container to store liquids from exploration in very large volumes at temperatures and pressures close to atmospheric conditions. Over time, environmental conditions and stored fluids can cause corrosion, leading to component failure. Corrosion results in the thinning of the walls of the storage tank and eventually leads to leakage of the liquid inside. Risk-based inspection (RBI) is one of the inspection methods used to determine the time interval for checking a component based on its risk level as a preventive effort against losses due to failure. Determining the risk level in the RBI method refers to calculating the probability of failure (PoF) and the consequence of failure (CoF). Besides its advantages, applying the RBI method requires a long time and is expensive. Deep learning is one of the methods in computational science that can be used as a basis for creating a risk level estimation program using the RBI method that is faster, cheaper, and more effective with high accuracy. This study aims to build and optimize a deep learning program by tuning parameters using data sets obtained from the results of random value generation regarding the provisions of the American Petroleum Institute (API) 581 standard. An accuracy value of 79% for the PoF prediction and 92% for the CoF prediction was obtained from the program optimization results, which was confirmed by high precision and recall values, indicating the program's success in predicting risk levels.