Great! I’m happy to help.
As an additional note: Once you use bidirectional=True
you almost certainly want to always use h_n
, since the last output of the reverse direction is in output[0]
and not in output[-1]
; see this older post of mine with the edit. h_n
will give you the last outputs for both directions much more conveniently.