As previously noticed, it is warmly suggested you use a GPU in order to train the examples proposed in this chapter. Managing to obtain results in a reasonable time using just a CPU is indeed impossible, and also using a GPU may turn into quite long hours waiting for the computer to complete the training. A solution, requiring the payment of a fee, could be to resort to Amazon Elastic Compute Cloud, also known as Amazon EC2 (https://aws.amazon.com/it/ec2/), part of the Amazon Web Services (AWS). On EC2 you can launch virtual servers that you can control from your computer using the Internet connection. You can require servers with powerful GPUs on EC2 and make your life with TensorFlow projects much easier.
Amazon EC2 is not the only cloud service around. We have suggested you this service because it is the one we used in order to test the code...