In this letter, an energy-efficiency (EE) resource allocation strategy is investigated for the amplify-and-forward (AF) protocol used to forward data to the destination. First, we formulate an EE optimization problem of multi-relay AF system, which correlates the power of source with the power of each relay. Then, a deep neural network (DNN)-based model is constructed to implement the joint power allocation of source and multiple relays. In particular, we adopt the modified rectified linear unit (ReLU) as the activation function in the output layer of the DNN model to hinder relays’ negative output power weightings, thereby to simultaneously realize the selection of relays and their power allocation. The simulation results show that our scheme enables better performance in term of the EE of system compared with the conventional strategies and convolutional neural network (CNN).