pdfcoffee
Chapter 12After clicking Launch Instance, you can create your virtual machine in two simplesteps:1. Choose an Amazon Machine Image (AMI): Amazon offers a variety ofprebuilt AMIs for Deep Learning (https://aws.amazon.com/machinelearning/amis/).The Conda AMIs (on AWS Linux, Ubuntu, and WindowsOS) provide prebuilt Conda virtual environments for various Deep Learningframeworks including TensorFlow. The Base AMIs (on AWS Linux andUbuntu) have various versions of CUDA preinstalled, and the user needsto enable the appropriate CUDA version and install the framework of choice.As of November 2019, the existing AMIs in AmazonMarketplace do not support TensorFlow 2.x.2. Choose the Instance type: Amazon offers a wide range of instance selection,from general purpose computing to accelerated computing. For the purposeof deep learning we require instances with GPUs. P3, P2, G4, G3, and G2instances have GPU support (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/accelerated-computing-instances.html). So, forDL projects you should select one of these. Please note that AWS has instancelimits set on these, by default for all accelerated compute instances it is setto 0. You will need to first request for an increase in the instance limit (againremember each instance is not available in every region, so go through thedocumentation to know what regions to choose for your required instance).Now unless you want to do advanced network and security settings, your machineis ready to launch. Just review your selections and launch it. Amazon EC2 allowsyou to communicate with your virtual machine through the command line via SSHor using a web browser.An alternative to Amazon EC2 is Compute Instance, available on GCP.[ 449 ]
TensorFlow and CloudCompute Instance on GCPTo access Compute instance, go to the Google Cloud Console and select ComputeEngine, and you will reach the dashboard where you can select the configurationyou want for your virtual machine. Following is a screenshot of the Compute Enginedashboard. Select Create or Import (if you already have a saved VM configuration)to create a new virtual machine instance:Figure 5: The Compute Engine dashboardAlternatively, you can also choose the complete configuration from the marketplace,which will launch the environment with the corresponding (minimum)infrastructure. You then just need to deploy the instance. Each instance will havedifferent price rating per month depending upon the compute resources it requires.GCP Compute Engine offers two options for CPUs families, either Intel Skylakeplatform (also called N1; this series allows GPUs) or the Intel Cascade Lake platform.With your machine you have an option to add GPUs. At the time of writing thisbook, GCP offered four different GPUs (and TPUs; for more on TPUs refer toChapter 16, Tensor Processing Unit):[ 450 ]
- Page 434 and 435: Chapter 10inpX = rbm.rbm_output(inp
- Page 436 and 437: Chapter 10(60000, 28, 28) (60000,)(
- Page 438 and 439: Chapter 10Figure 11: Summary of the
- Page 440 and 441: Chapter 10This chapter, along with
- Page 442 and 443: Reinforcement LearningThis chapter
- Page 444 and 445: Chapter 11And unlike unsupervised l
- Page 446 and 447: Chapter 11Normally, the value is de
- Page 448 and 449: Chapter 11• The next question tha
- Page 450 and 451: Chapter 11This neural network takes
- Page 452 and 453: Chapter 11The MuJoCo environment re
- Page 454 and 455: Chapter 11We will first import the
- Page 456 and 457: Chapter 11The αα is the learning
- Page 458 and 459: Chapter 11We set up the global valu
- Page 460 and 461: Chapter 11else:return np.argmax(sel
- Page 462 and 463: Chapter 11DQN to play a game of Ata
- Page 464 and 465: Chapter 11self.model.add( Conv2D(64
- Page 466 and 467: Chapter 11Here the action A was sel
- Page 468 and 469: Chapter 11Image source: https://arx
- Page 470 and 471: Chapter 11A neural network is used
- Page 472: Chapter 1111. Details regarding ins
- Page 475 and 476: TensorFlow and Cloud• Scalability
- Page 477 and 478: TensorFlow and Cloud• Azure DevOp
- Page 479 and 480: TensorFlow and Cloud• Lambda: The
- Page 481 and 482: TensorFlow and Cloud• Deep Learni
- Page 483: TensorFlow and CloudEC2 on AmazonTo
- Page 487 and 488: TensorFlow and CloudYou just share
- Page 489 and 490: TensorFlow and CloudIn case you req
- Page 491 and 492: TensorFlow and CloudIt starts with
- Page 493 and 494: TensorFlow and CloudTFX librariesTF
- Page 495 and 496: TensorFlow and CloudReferences1. To
- Page 497 and 498: TensorFlow for Mobile and IoT and T
- Page 499 and 500: TensorFlow for Mobile and IoT and T
- Page 501 and 502: TensorFlow for Mobile and IoT and T
- Page 503 and 504: TensorFlow for Mobile and IoT and T
- Page 505 and 506: TensorFlow for Mobile and IoT and T
- Page 507 and 508: TensorFlow for Mobile and IoT and T
- Page 509 and 510: TensorFlow for Mobile and IoT and T
- Page 511 and 512: TensorFlow for Mobile and IoT and T
- Page 513 and 514: TensorFlow for Mobile and IoT and T
- Page 515 and 516: TensorFlow for Mobile and IoT and T
- Page 517 and 518: TensorFlow for Mobile and IoT and T
- Page 519 and 520: TensorFlow for Mobile and IoT and T
- Page 521 and 522: TensorFlow for Mobile and IoT and T
- Page 523 and 524: TensorFlow for Mobile and IoT and T
- Page 525 and 526: TensorFlow for Mobile and IoT and T
- Page 527 and 528: An introduction to AutoMLThat is pr
- Page 529 and 530: An introduction to AutoMLFeature co
- Page 531 and 532: An introduction to AutoMLThis Effic
- Page 533 and 534: An introduction to AutoMLGoogle Clo
TensorFlow and Cloud
Compute Instance on GCP
To access Compute instance, go to the Google Cloud Console and select Compute
Engine, and you will reach the dashboard where you can select the configuration
you want for your virtual machine. Following is a screenshot of the Compute Engine
dashboard. Select Create or Import (if you already have a saved VM configuration)
to create a new virtual machine instance:
Figure 5: The Compute Engine dashboard
Alternatively, you can also choose the complete configuration from the marketplace,
which will launch the environment with the corresponding (minimum)
infrastructure. You then just need to deploy the instance. Each instance will have
different price rating per month depending upon the compute resources it requires.
GCP Compute Engine offers two options for CPUs families, either Intel Skylake
platform (also called N1; this series allows GPUs) or the Intel Cascade Lake platform.
With your machine you have an option to add GPUs. At the time of writing this
book, GCP offered four different GPUs (and TPUs; for more on TPUs refer to
Chapter 16, Tensor Processing Unit):
[ 450 ]