Using Apache 2.0 basically means you are indifferent about what others use your code for. I don't see why AI training should be an exception... there are much more nefarious uses.