Till now, what I have learned is that it is a trial and error process.
And the best solution is to look for projects that have already done this using a working combination of libraries.
I used this requirements.txt file, which works fine:
Bidrectional LSTMs are still traditional and so I believe you refer to unidirectional LSTM models.
Unidirectional LSTM layers only preserve information of the past, as inputs are processed at each time point in a sequential forward pass. This means that, at each time-point the sequence model only reads information from the past. However bidirectional ...
If you are open to using huggingface transformer for fine tuning which is really popular, here is a code sample:
self.Bert = transformers.CamemBertModel.from_pretrained('camembert-base')
self.fc0 = nn.Linear(768,1)
The framing of your problem is close to so-called language modeling task. Because your input data is fixed-length samples, you can use a seq2seq model with fixed-size context embedding.
What this means is you would essentially have an encoder, Bi-LSTM for example which encodes your input into a fixed representation (by concatenating the final output states ...
Setting stride to 0 is not necessary, torch will simply compute with respect to the input tensor sizes, so you can set stride to (1,1).
For x of size (batch_size, 3, max_dim_0, max_dim_0) (square image) the tensor output will be of size (batch_size, 32, 1, max_dim_0).
First of all, I would like you to discourage you from using structured input in NMT. In most cases, the best thing you can do is just do some subword input and output segmentation and learn simple sequence-to-sequence conversion.
You can certainly pass the parsed input in the format that you showed above and the worse thing you can expect the model will to ...