You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Deep Learning/Recurrent Neural Networks/Recurrent-Neural-Networks.md
+16-13Lines changed: 16 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -47,10 +47,12 @@ Many-to-Many architecture can also be represented in models where input and outp
47
47
The basic RNN can be described by the following equations:
48
48
49
49
1. Hidden state update:
50
-
$$ h_t = f(W_{hh}h_{t-1} + W_{xh}x_t + b_h) $$
51
50
52
-
2. Output calculation:
53
-
$$ y_t = g(W_{hy}h_t + b_y) $$
51
+
$$h_t = f(W_{hh}h_{t-1} + W_{xh}x_t + b_h)$$
52
+
53
+
3. Output calculation:
54
+
55
+
$$y_t = g(W_{hy}h_t + b_y)$$
54
56
55
57
Where:
56
58
- $h_t$ is the hidden state at time $t$
@@ -66,7 +68,7 @@ Where:
66
68
67
69
RNNs are trained using Backpropagation Through Time (BPTT), an extension of the standard backpropagation algorithm. The loss is calculated at each time step and propagated backwards through the network:
Where $L$ is the total loss and $L_t$ is the loss at time step $t$.
72
74
@@ -77,12 +79,15 @@ Where $L$ is the total loss and $L_t$ is the loss at time step $t$.
77
79
78
80
LSTMs address the vanishing gradient problem in standard RNNs by introducing a memory cell and gating mechanisms. The LSTM architecture contains three gates and a memory cell:
- $f_t$, $i_t$, and $o_t$ are the forget, input, and output gates respectively
@@ -110,8 +115,6 @@ Where:
110
115
- $i_t$: Decides which values we'll update.
111
116
- $\tilde{C}_t$: Creates a vector of new candidate values that could be added to the state.
112
117
- This is how as Input gate look like:
113
-
114
-
115
118

116
119
117
120
3.**Cell State Update**:
@@ -147,4 +150,4 @@ The power of LSTMs lies in their ability to selectively remember or forget infor
147
150
148
151
## Conclusion
149
152
150
-
RNNs and their variants like LSTM are powerful tools for processing sequential data. They have revolutionized many areas of machine learning, particularly in tasks involving time-dependent or sequential information. Understanding their structure, mathematics, and applications is crucial for effectively applying them to real-world problems.
153
+
RNNs and their variants like LSTM are powerful tools for processing sequential data. They have revolutionized many areas of machine learning, particularly in tasks involving time-dependent or sequential information. Understanding their structure, mathematics, and applications is crucial for effectively applying them to real-world problems.
0 commit comments