TensorFlow works with AMD's CUDA alternative named ROCm. You'd need to check installation instructions though.
https://www.logicalclocks.com/blog/welcoming-amd-rocm-to-hop...
Performance ain't so bad on AMD GPUs anymore - and none of the EULA crap. Just buy a Vega R7 for 500 bucks and get 16 GB of memory and the performance of close to a 2080 Ti (for convnets, at least) - but with no data center restrictions:
https://github.com/ROCmSoftwarePlatform/tensorflow-upstream/...
For example I was able to run fast.ai/pytorch oh my amd gpu https://github.com/briangorman/fastai_rocm_docker