In this scenario, the goal is to speed up model training for a CNN-based architecture on Google
Cloud. The code does not include any manual device placement and has not been wrapped in
Estimator model-level abstraction. Given these constraints, the best environment to train the model
on would be a Deep Learning VM with an n1-standard-2 machine and 1 GPU with all libraries pre-
installed. Option C is the correct answer.
Option C: A Deep Learning VM with an n1-standard-2 machine and 1 GPU with all libraries pre-
installed. This option is the most suitable for the scenario because it provides a ready-to-use
environment for deep learning on Google Cloud. A Deep Learning VM is a specialized VM image that
is pre-installed with popular deep learning frameworks such as TensorFlow, PyTorch, Keras, and
more. A Deep Learning VM also comes with NVIDIA GPU drivers and CUDA libraries that enable GPU
acceleration for model training. A Deep Learning VM can be easily configured and launched from the
Google Cloud Console or the Cloud SDK. An n1-standard-2 machine is a general-purpose machine
type that provides 2 vCPUs and 7.5 GB of memory. This machine type can be sufficient for running a
CNN-based architecture. A GPU is a specialized hardware accelerator that can speed up the
computation of matrix operations and convolutions, which are common in CNN-based architectures.
By using a Deep Learning VM with an n1-standard-2 machine and 1 GPU, the model training can be
significantly faster than on an on-premises CPU-only infrastructure.
Option A: A VM on Compute Engine and 1 TPU with all dependencies installed manually. This option
is not suitable for the scenario because it requires manual installation of dependencies and device
placement. A TPU is a custom-designed ASIC that can provide high performance and efficiency for
TensorFlow models. However, to use a TPU, the code needs to include manual device placement and
be wrapped in Estimator model-level abstraction. Moreover, to use a TPU, the dependencies such as
TensorFlow, Cloud TPU Client, and Cloud Storage need to be installed manually on the VM. This
option can be complex and time-consuming to set up and may not be compatible with the existing
code.
Option B: A VM on Compute Engine and 8 GPUs with all dependencies installed manually. This option
is not suitable for the scenario because it requires manual installation of dependencies and may not
be cost-effective. While using 8 GPUs can provide high parallelism and speed for model training, it
also increases the cost and complexity of the environment. Moreover, to use GPUs, the
dependencies such as NVIDIA GPU drivers, CUDA libraries, and deep learning frameworks need to be
installed manually on the VM. This option can be tedious and error-prone to set up and may not be
necessary for the scenario.
Option D: A Deep Learning VM with more powerful CPU e2-highcpu-16 machines with all libraries
pre-installed. This option is not suitable for the scenario because it does not leverage GPU
acceleration for model training. While using more powerful CPU machines can provide more
compute resources and memory for model training, it may not be as fast and efficient as using GPU
machines. CPU machines are not optimized for matrix operations and convolutions, which are
common in CNN-based architectures. Moreover, using more powerful CPU machines can also
increase the cost of the environment. This option can be suboptimal and wasteful for the scenario.
Reference:
Deep Learning VM Image documentation
Compute Engine documentation
Cloud TPU documentation
Machine types documentation
GPUs on Compute Engine documentation