A deep learning-based resource allocation algorithm that maximizes the sum rate of a limited fronthaul cell-free massive MIMO network with transceiver hardware impairments is proposed in this paper. The sum rate maximization problem with user power constraints and total fronthaul capacity constraints for channel state information (CSI) and data transmission is considered. The deep neural network (DNN) PowerNet is proposed to learn solutions to the joint power control and capacity allocation problem in a low-complex, flexible, and scalable way. An unsupervised learning approach is used which eliminates the need of knowing the optimal resource allocation vectors during model training, hence having a simpler and more flexible model training stage. Numerical simulations show that PowerNet achieves close sum rate performance compared to the existing optimization-based approach, with a significantly lower time complexity which does not exponentially scale with the number of users and access points (APs) in the network. Furthermore, the addition of the online learning stage resulted in a better sum rate than the optimization-based method.