Training the quantum approximate optimization algorithm without access to a quantum processing unit