This commit is contained in:
Morten Hjorth-Jensen
2021-11-03 06:43:49 +01:00
parent 2d6b94571f
commit f6ac0c5f91
6 changed files with 269 additions and 264 deletions
+1
View File
@@ -2149,6 +2149,7 @@ t0, t1 = <span style="color: #B452CD">5</span>, <span style="color: #B452CD">50<
theta = np.random.randn(<span style="color: #B452CD">2</span>,<span style="color: #B452CD">1</span>)
<span style="color: #228B22"># note: here the number of minibatches is equal to the number of points!!</span>
<span style="color: #8B008B; font-weight: bold">for</span> epoch <span style="color: #8B008B">in</span> <span style="color: #658b00">range</span>(n_epochs):
<span style="color: #8B008B; font-weight: bold">for</span> i <span style="color: #8B008B">in</span> <span style="color: #658b00">range</span>(m):
random_index = np.random.randint(m)
@@ -2073,6 +2073,7 @@ t0, t1 = <span style="color: #B452CD">5</span>, <span style="color: #B452CD">50<
theta = np.random.randn(<span style="color: #B452CD">2</span>,<span style="color: #B452CD">1</span>)
<span style="color: #228B22"># note: here the number of minibatches is equal to the number of points!!</span>
<span style="color: #8B008B; font-weight: bold">for</span> epoch <span style="color: #8B008B">in</span> <span style="color: #658b00">range</span>(n_epochs):
<span style="color: #8B008B; font-weight: bold">for</span> i <span style="color: #8B008B">in</span> <span style="color: #658b00">range</span>(m):
random_index = np.random.randint(m)
+1
View File
@@ -2150,6 +2150,7 @@ t0, t1 <span style="color: #666666">=</span> <span style="color: #666666">5</spa
theta <span style="color: #666666">=</span> np<span style="color: #666666">.</span>random<span style="color: #666666">.</span>randn(<span style="color: #666666">2</span>,<span style="color: #666666">1</span>)
<span style="color: #408080; font-style: italic"># note: here the number of minibatches is equal to the number of points!!</span>
<span style="color: #008000; font-weight: bold">for</span> epoch <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">range</span>(n_epochs):
<span style="color: #008000; font-weight: bold">for</span> i <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">range</span>(m):
random_index <span style="color: #666666">=</span> np<span style="color: #666666">.</span>random<span style="color: #666666">.</span>randint(m)
Binary file not shown.
File diff suppressed because it is too large Load Diff