前付けインストール
Installing the Deep Learning Framework and the d2l Package 深層学習フレームワークとd2lパッケージのインストール
Before installing any deep learning framework, please first check whether or not you have proper GPUs on your machine (the GPUs that power the display on a standard laptop are not relevant for our purposes). For example, if your computer has NVIDIA GPUs and has installed CUDA, then you are all set. If your machine does not house any GPU, there is no need to worry just yet. Your CPU provides more than enough horsepower to get you through the first few chapters. Just remember that you will want to access GPUs before running larger models.
英語のヒント
深層学習フレームワークをインストールする前に、まずマシンに適切なGPUがあるかどうかを確かめてほしい(普通のノートパソコンの画面表示を担うGPUは、ここでの目的には関係がない)。たとえば、コンピュータにNVIDIAのGPUがあり、CUDAをインストール済みなら、準備は整っている。マシンにGPUがまったくなくても、今のところ心配はいらない。最初のいくつかの章を進めるには、CPUで十分すぎるほどの馬力がある。ただ、もっと大きなモデルを動かす前にはGPUを使いたくなることは覚えておいてほしい。
You can install PyTorch (the specified versions are tested at the time of writing) with either CPU or GPU support as follows:
英語のヒント
PyTorch(指定した版は執筆時点でテストしたもの)は、CPU対応でもGPU対応でも、次のようにインストールできる。
pip install torch==2.0.0 torchvision==0.15.1Our next step is to install the
d2l package that we developed in order to encapsulate frequently used functions and classes found throughout this book:英語のヒント
次の手順は、この本の随所に出てくるよく使う関数やクラスをまとめるために私たちが開発した
d2lパッケージをインストールすることである。pip install d2l==1.0.3