Skip to content

Commit 8884867

Browse files
author
Esteban Gómez
committed
Update LSTM docs
1 parent 821f347 commit 8884867

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/modules/lstm.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,11 @@ The number of operations performed by a `torch.nn.LSTM` module can be estimated
171171
$\text{LSTM}_{ops} = 16\times L\times N \times H_{out}\times \left(H_{in}+\left(3\times\text{num\_layers}-2\right)\times H_{out}+3.875\times\text{num\_layers}\right)$
172172

173173
=== "If `bias=False` and `bidirectional=True`"
174-
$\text{LSTM}_{ops} = 16\times L\times N \times H_{out}\times \left(H_{in}+\left(3\times\text{num\_layers}-2\right)\times H_{out}+2.875\times\text{num\_layers}\right)$
174+
$\text{LSTM}_{ops} = 16\times L\times N \times H_{out}\times \left(H_{in}+\left(3\times\text{num\_layers}-2\right)\times H_{out}+2.875\times\text{num\_layers}\right)$
175+
176+
Where
177+
178+
* $L$ is the sequence length.
179+
* $N$ is the batch size.
180+
* $H_{in}$ and $H_{out}$ are the number of input and output features, respectively.
181+
* $\text{num\_layers}$ is the number of layers.

0 commit comments

Comments
 (0)