Skip to content

Instantly share code, notes, and snippets.

@omarsar
Created August 19, 2018 02:50
Show Gist options
  • Save omarsar/eeff90319d30c8341fc3d9e05f8b9e2f to your computer and use it in GitHub Desktop.
Save omarsar/eeff90319d30c8341fc3d9e05f8b9e2f to your computer and use it in GitHub Desktop.
N_INPUT = 4
N_NEURONS = 1
X0_batch = torch.tensor([[0,1,2,0], [3,4,5,0],
[6,7,8,0], [9,0,1,0]],
dtype = torch.float) #t=0 => 4 X 4
X1_batch = torch.tensor([[9,8,7,0], [0,0,0,0],
[6,5,4,0], [3,2,1,0]],
dtype = torch.float) #t=1 => 4 X 4
model = SingleRNN(N_INPUT, N_NEURONS)
Y0_val, Y1_val = model(X0_batch, X1_batch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment