In the event of flooding, damage can be reduced by pre-release water. In Thailand, however, the rainy and dry seasons are separated, and dams need to store enough water for the dry season. This results in a high risk of pre-discharge flood. Therefore, it is important to accurately predict dam inflows to make decisions on pre-releases. In this study, we used the Transformer model, which has been attracting attention recently and is becoming a trend in machine learning. A large amount of data is necessary to improve the accuracy of machine learning, but there is only a limited number of monthly inflow data. This study uses the data from Sirikit Dam for pretraining to predict the monthly inflows at Bhumipol Dam and Srinakarin Dam. As a result, the Nash-Sutcliffe efficiency is successfully improved from 0.17 to 0.75 by using incremental learning when the training period was only 5 years.