PyTorch is a software-based open source deep learning framework used to build neural networks, combining the machine learning (ML) library of Torch with a Python-based high-level API. Its flexibility and ease of use, among other benefits, have made it the leading ML framework for academic and research communities.
PyTorch supports a wide variety of neural network architectures, from simple linear regression algorithms to complex convolutional neural networks and generative transformer models used for tasks like computer vision and natural language processing (NLP). Built on the widely understood Python programming language and offering extensive libraries of pre-configured (and even pre-trained) models, PyTorch allows data scientists to build and run sophisticated deep learning networks while minimizing the time and labor spent on code and mathematical structure.
PyTorch also allows data scientists to run and test portions of code in real time, rather than wait for the entire code to be implemented—which, for large deep learning models, can take a very long time. This makes PyTorch an excellent platform for rapid prototyping, and also greatly expedites the debugging process.
https://mitani.cs.tsukuba.ac.jp/book_support/python/python_slides.pdf
複数のスレッドがまとまったグループがブロックで、1ブロックに含まれるスレッド数は1,024までです。同じブロック内のスレッドは高速な共有メモリでデータをやり取りでき、効率的な処理ができます。
グリッドは複数のブロックをまとめた全体構造で、カーネル全体のことです。ブロック間は独立して実行され、グラフィックス(GPU)の性能を問わず同じコードが動作します。
ハードウェアレベルでは32個のスレッドが「ワープ」としてまとめられ、SIMT(Single Instruction Multiple Threads:並列処理の実行モデル)方式で同時実行されます。ワープ内のすべてのスレッドが同じ命令を実行し、プログラムの分岐が少ないほど効率がよいです。また、処理性能を引き出すには、ブロックのスレッド数を32の倍数にすることが推奨されています。
PyTorch supports a wide variety of neural network architectures, from simple linear regression algorithms to complex convolutional neural networks and generative transformer models used for tasks like computer vision and natural language processing (NLP). Built on the widely understood Python programming language and offering extensive libraries of pre-configured (and even pre-trained) models, PyTorch allows data scientists to build and run sophisticated deep learning networks while minimizing the time and labor spent on code and mathematical structure.
PyTorch also allows data scientists to run and test portions of code in real time, rather than wait for the entire code to be implemented—which, for large deep learning models, can take a very long time. This makes PyTorch an excellent platform for rapid prototyping, and also greatly expedites the debugging process.
何でこんなにPythonがもてはやされてるか謎なんだが
処理の重いAIは高速に動作するC++の方が適してると思うんだが
開発チームによると、「PyTorch」パッケージの総ダウンロード数のうち「Anaconda」conda)からのものは5%に満たないにもかかわらず、総メンテナンスコストの半分以上を占めているのだという。「Python」の主流パッケージ管理システム「pip」とは異なるパラダイムで「Anaconda」パッケージを管理するのは負担が大きく、ビルドにも多くのハードウェアリソースと時間を要する。また、ユーザーにとっても双方のビルドが常に一致しないのは混乱の種となっていた。
そこで、「Anaconda」のデフォルトパッケージに依存する「Anaconda」パッケージは公開が停止されることになった。「Anaconda」の「PyTorch」チャネルで公開される最終バージョンは「2.5」となる。
開発チームは今後、リソースを「wheel」形式パッケージの維持・改善に集中する考え。これからも「Anaconda」で「PyTorch」をインストールしたい場合は、「download.pytorch.org」や「PyPI」から公式のWheel形式パッケージを用いるか、コミュニティ主導のリポジトリ「conda-forge」からパッケージを入手する必要がある。2024年11月18日 14:37
畳み込み層の役割は、画像内の局所的な特徴量の抽出です。画像には隣接するピクセル間の関係性があり、エッジや色の変化といった局所的な特徴を検出します。これにより、画像内の情報を保持しつつ、高度な特徴の抽出が可能となります。
プーリング層
プーリング層の役割は移動不変性の付与です。プーリング層では、畳み込み層で抽出された特徴が移動しても影響を受けないようにします。例えば、犬と猫を画像データから判別する場合、本来であればそれぞれの動物が画像内のどこにいても判別には影響を与えません。しかし、畳み込み層で出力された特徴だけでは、学習した画像の左側に動物がいた場合に、右側に動物がいる場合の判別がうまく行えません。そこで、プーリング層では犬や猫といった特徴を維持しながら位置に関する情報を削ぎ落とすことで、重要な情報を保持する役割を果たしています。
全結合層
全結合層は畳み込み層やプーリング層で抽出された特徴を基に、最終的な分類や予測を行う層です。異なる組み合わせによるパターンを学習し、入力データがどのクラスに属するかを決定しており、高度な識別や予測を可能としています。
変な流れになりつつある
AIにプログラミングが踏み荒らされそうになってるから売上落ちる前に発売するしかない
単なる計算で終わらせず、数値データから本質的なインサイトを引き出すための「公式推奨の学習フロー」を動画で学べる決定版。文系・理系を問わず、現代の必須教養がここに詰まっている。
https://ocw.kyoto-u.ac.jp/course/809/
https://ocw.tsukuba.ac.jp/course/systeminformation/machine_learning/
講義動画見放題
講義ノート/演習問題DL可能
・機械学習概論
・単回帰
・重回帰
・モデルの複雑さと汎化
・特徴選択とL1正則化
・決定的識別モデル
・カーネル法
・確率的識別モデル
・経験損失最小化
・k-means
・主成分分析
・ニューラルネットワーク基礎
・CNN
・RNN
・GAN