Skip to content

Commit 591ddfa

Browse files
authored
Update proj5.html
1 parent 90ccb0f commit 591ddfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

project-5/proj5.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ <h4>Adding Class-Conditioning to Time-Conditioned UNet</h4>
10621062
To make more improvements to our image generation, we can condition our UNet on the class of digits 0-9. This requires adding an additional FCBlock for the <code>unflat</code> and <code>firstUpBlock</code> tensor, where we convert the class vector <code>c</code> into a one-hot vector before passing it through FCBlock. To ensure that the UNet would still work without conditioning on the class (in order to implement CFG later), we will set a dropout rate <code>p<sub>uncond</sub></code> of 0.1, in which we set the one-hot vector of <code>c</code> to all 0s.
10631063

10641064
<h4>Embedding <code>c</code> and <code>t</code> in the UNet</h4>
1065-
To embed <code>c</code> <code>t</code> in the UNet, we will use 2 additional FCBlocks to convert the label (<code>c</code>) into 2 tensors <code>fc1_c</code> and <code>fc2_c</code>, each with the same number of hidden dimensions as <code>fc1_t</code> and <code>fc2_t</code> respectively. Then, instead of multiplying the intermediate blocks by the time tensor, we will instead do:
1065+
To embed <code>c</code> and <code>t</code> in the UNet, we will use the 2 additional FCBlocks to convert the label (<code>c</code>) into 2 tensors <code>fc1_c</code> and <code>fc2_c</code>, each with the same number of hidden dimensions as <code>fc1_t</code> and <code>fc2_t</code> respectively. Then, instead of multiplying the intermediate blocks by the time tensor, we will instead do:
10661066
<pre><code>unflat_cond_class = unflat * fc1_c + fc1_t
10671067
firstUpBlock_cond_class = firstUpBlock * fc2_c + fc2_t</code></pre>
10681068

0 commit comments

Comments
 (0)