Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

recurrent neural network pytorch

import torch
from torch import nn

# check documentation in the source link for further information
rnn = nn.RNN(10, 20, 2)

# initialize vectors at t=0
x = torch.randn(5, 3, 10) 
h0 = torch.randn(2, 3, 20) 

output, hn = rnn(x, h0)
Source by pytorch.org #
 
PREVIOUS NEXT
Tagged: #recurrent #neural #network #pytorch
ADD COMMENT
Topic
Name
1+6 =