The error is raised in:
lstm_out, hidden=self.lstm(embedded, self.hidden_dim)

since you are passing in the self.hidden_dim, which is an integer instead of the expected hidden tensor.
Have a look at the docs for more information regarding its shape etc. or just remove it, if you want to use the default zero-initialized hidden.
Once this is fixed, you would run into another issue, as you are trying to use the returned hidden tensor to reshape the lstm_out in:
lstm_out=lstm_out.contiguous().view(-1, hidden)

so you might want to use self.hidden_dim for it.
That being said, note that this view operation would collapse the temporal and batch dimension.