Thanks a lot, I have corrected already but another problem rose. I hope you can help me with this, I am very new to understand pytorch lstm and encoderlayer.
in my model 1 D CNN is followed by lstm layers, But at this encoder layer I am getting syntax error
self.encoder_layer=nn.TransformerEncoderLayer(d_model=self.hidden_size_lstm*2,dim_feedforward=512,nhead=self.num_heads_self_attn)
I am not getting whats wrong, referred doc of pytorch too.