According to the docs 17 the hidden variables need to be of size (num_layers * num_directions, batch, hidden_size).
Your LSTM has input dim 3, hidden/output dim 3 and 1 layer. Your batch size seems to be 1.
Therefore your hidden state variables need to be of size (1, 1, 3) not (3, 1, 3) as your code currently does.