10000 Fix typos/wording in generative notebook by andreasgrv · Pull Request #334 · april-tools/cirkit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix typos/wording in generative notebook #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions notebooks/generative-vs-discriminative-circuit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@
"Can we do better?\n",
"\n",
"\n",
"### Parameter Sharing\n",
"Yes! We can use **parameter sharing**, i.e., we can share the early layers of our circuit and only adapt the output layer to produce our conditional distributions.\n",
"### Shared Representations\n",
"Yes! We can share the early layers of our circuit and only adapt the output layer to produce our conditional distributions.\n",
"Since there are $10$ classes, we change the last layer of our circuit to output $10$ log-probabilities: the probability mass over images conditioned on each class, $p(\\mathbf{x} \\mid y)$.\n",
"We can do so by specifying the `num_classes` option in `data_modalities.image_data`.\n",
"\n",
Expand Down Expand Up @@ -347,7 +347,7 @@
"\n",
"</div>\n",
"\n",
"The RAT SPN papepr also considers training using a trade-off between the two objectives.\n",
"The RAT SPN paper also considers training using a trade-off between the two objectives.\n",
"To do so, it introduces a parameter $\\lambda \\in [0, 1]$ and minimize a combined loss:\n",
"\n",
"$$\n",
Expand All @@ -357,7 +357,7 @@
"where we divide $\\mathcal{L}_{gen}(\\theta)$ by the number of pixels in the image, $|X|$, such that the losses are on a comparable scale[<sup>2</sup>](#fn2).\n",
"\n",
"* $\\lambda = 0 \\rightarrow$ Model trained only generatively\n",
"* $\\lambda = 1 \\rightarrow$ Model trained only contrastively\n",
"* $\\lambda = 1 \\rightarrow$ Model trained only discriminatively\n",
"* $\\lambda \\in (0, 1) \\rightarrow$ Trade-off between losses\n",
"\n",
"<span style=\"font-size: .75em;\"> [<sup id=\"fn2\">2</sup>](#fn2-back) Note that $\\mathcal{L}_{gen}$ and $\\mathcal{L}_{dis}$ are on different scales, primarily because they are defined on a different number of random variables.\n",
Expand Down Expand Up @@ -1222,7 +1222,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Loading
0