Blog
-
Medical AI with Python
[Medical AI with Python:P22] ニューラルネットワークをPyTorchで定義してみよう
PyTorchモデル構築の設計図 PyTorchでは、AIモデルをクラスとして設計します。まず構造の「部品」(層)を__init__()で定義し、次にデータの「流れ」をforward()で記述します。この2段階の設計が、あらゆるカスタムAIを構築する上での基本となります。 ① ... -
Medical AI with Python
[Medical AI with Python:P56] Transformer Decoderモデルにおける出力生成の仕組み
Transformerの心臓部:行列計算の全貌 Transformerは、テキストを数値ベクトルに変換し、幾層もの「自己注意機構」と「フィードフォワードネットワーク」を通して文脈を深く理解します。最終的に次に来る単語の確率を計算するこの一連のプロセスは、すべて... -
Medical AI with Python
[Medical AI with Python:P21] Tensorと自動微分を体験しよう
PyTorch学習サイクルのポイント PyTorchは、Tensorという多次元配列を用いて計算を行い、その過程を「計算グラフ」として自動記録します。このグラフを逆向きにたどる「自動微分」によって、モデルが賢くなるためのヒント(勾配)を算出し、パラメータを更... -
Basic
[Medical AI Classroom: B10] From Context to Expression — How Transformers and Probabilities Enable AI to Write Naturally —
🟦 Introduction: From “Reading” to “Writing” — How AI Creates Language In the previous sessions, we learned that AI has already acquired two essential capabilities: The ability to convert words into meaningful numerical representations (... -
Basic
[Medical AI Classroom: B9] What Does AI Focus On Within a Sentence? — How “Attention” Helps AI Understand the Flow of Language —
🟦 Introduction: Understanding a Sentence Requires More Than Just Word Meanings In the previous session, we explored how AI attempts to understand words like “apple” or “hospital” by converting them into meaningful bundles of numbers—so-... -
Basic
[Medical AI Classroom: B8] Does AI Truly Understand the Meaning of Words? — How AI Learns to Treat Language as Something Meaningful —
Introduction: Does AI Truly Understand “Meaning”? Today’s AI systems have become remarkably fluent in using language.They can read and summarize text, and even respond as if they’re having a natural conversation with a human. For example... -
Basic
【医療AI教室:B10】AIはどうやって文章を「つくっている」のか?― 言葉をつむぎ出す、予測と確率のしくみ ―
はじめに:「読む」だけでなく「書く」AIへ これまでの回で、AIが次の2つの力を持っていることを学んできました。 単語を「意味のある数字(ベクトル)」に変換する力(第1回) 文の中で「何に注目すべきか」を理解する力(第2回) つまり、AIはすでに「読... -
Basic
【医療AI教室:B9】AIは文章の中で「何に注目しているのか?」― 文章の“つながり”を読む「Attention」という仕組み ―
難易度:★★★★☆ はじめに:単語の意味だけでは、文章は読めない 前回の講義では、AIがどのようにして「apple」や「hospital」といった単語を”意味のある“数字のかたまり”(ベクトル)として理解しようとしているのかを学びました。このようなベクトル表現に... -
Basic
【医療AI教室:B8】AIは言葉の意味を本当に理解しているのか?― AIが言葉を「意味あるもの」として扱えるようになるまで ―
はじめに:AIは「意味」をわかっているの? 最近のAIは、とても自然に言葉を使いこなせるようになってきました。文章を読んだり、要約したり、まるで人と会話しているかのように返事をしてくれることもあります。 たとえば、こんなことができます: 「この... -
Medical AI with Python
[医療×生成系AI :P11/G3.3] Pythonと深層学習入門(ニューラルネットを構築しよう)
難易度:★★☆☆☆ 💡この第3章では、第1・2章で学んだ知識を活かし、実際にニューラルネットワークを構築してMNIST手書き数字データを分類してみましょう。モデルの定義から訓練、精度の評価、そして誤認識の可視化まで、ディープラーニングの基本サイクルを...
