Could you check, if you are accidentally passing an int to the model instead of a tensor?
The error is raised, if you are trying to index an int via:
1[0]
> TypeError: 'int' object is not subscriptable

which seems to be called somewhere inside the forward method.