The number of in_features in hidden2tag doesn’t match the features in merge_out.
Unfortunately your code isn’t executable, so I would recommend to check the shape of merge_out, make sure the number of dimensions fits your use case and adapt the in_features of the linear layer.