You can train it using a classical optimizer just as in quantum circuits without measurement. As long as you have an objective function, you can try using scipy.optimize
or other classical optimizers.
Check out this post for a good example. The example doesn't include measurement, but as long as you can feed a single number into the optimizer you're ready to start optimizing.