So, I am attempting to make a internet to translate a phrase. However I am unsure of using LinearLayer for a NetEncoder for Characters and getting some error within the coaching course of. Right here a toy instance of the online with the primary error
trainingdata = Dataset["Linha" -> 3,
"portugues" ->
"M: Ainda está enjoada, mamãe? Está tudo bem com você?",
"ingles" ->
"M: Are you still not feeling well, Mom? Are you really okay?"]
ptenconder = NetEncoder[{"Characters"}];
ptdecoder = NetDecoder[{"Characters"}];
internet = NetGraph[{LinearLayer[], LinearLayer[], LinearLayer[],
LinearLayer[], CatenateLayer[],
LinearLayer[]}, {NetPort["portugues"] -> {1, 2, 3, 4} ->
5 -> 6 -> NetPort["ingles"]}, "portugues" -> ptenconder,
"ingles" -> ptdecoder]
Then
translator = NetTrain[net, trainingdata]
If I modify LinearLayer[] to LinearLayer[100] the error adjustments and I acquired it: