You did not provide the whole script that could be run on other people's computers.
However, from looking at the partial script above, I can see that the model creation and compilation is done in the default context that probably is set to GPU.
Then you train under CPU device. It seems that Tensorflow transfers variables between CPU and GPU all the time during training. At least this is my guess for it.