update
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
+265
-264
File diff suppressed because it is too large
Load Diff
@@ -1478,6 +1478,7 @@ def learning_schedule(t):
|
||||
|
||||
theta = np.random.randn(2,1)
|
||||
|
||||
# note: here the number of minibatches is equal to the number of points!!
|
||||
for epoch in range(n_epochs):
|
||||
for i in range(m):
|
||||
random_index = np.random.randint(m)
|
||||
|
||||
Reference in New Issue
Block a user