New answers tagged

1

you need to define how many time steps you want to have in each time series block. then for each unique patient, you need to create these blocks so the training set going to be a 3D matrix, and the dimensions are: number of blocks * number of time steps * number of features in addition to time series data, you can also add another head to feed NN with the ...


1

About the need for tgt_key_padding_mask While padding is usually applied after the normal tokens (i.e. right padding), it is perfectly fine to apply it before normal tokens (i.e. left padding). For instance, fairseq supports parameter left_pad to specify precisely this. For left padding to be handled correctly, you must mask the padding tokens, because the ...


1

One is a straight forward use of API while the other one gives you much better control on training. If you are experimenting, it is good to go with a custom training loop so you can control the various things that happen to your model's training. But, if you want to just train a model and not experiment with it much, save time and go for the straight forward ...


3

After a Googling around, I think this tutorial may suit your needs. However, it seems you have a misconception about the Transformer decoder: in training mode there is no iteration at all. While LSTM-based decoders are autoregressive by nature, Transformers are not. Instead, all predictions are generated at once based on the real target tokens (i.e. teacher ...


Top 50 recent answers are included