For detailed instructions on getting started with TensorFlow with DirectML, see the tensorflow-directml GitHub repo and GPU accelerated ML training.
Two sample models are included in this repo to help you get started. These samples include both inference and training scripts, and you can either train the models from scratch or use the supplied pre-trained weights.