The Convergence Rate of Neural Networks for Learned Functions of Different Frequencies