delldu / Translation

Translate English to Chinese with seq2seq + attention model.
Apache License 2.0
19 stars 8 forks source link

Hello, sorry for bothering! #1

Open jobsfan opened 4 years ago

jobsfan commented 4 years ago

When I run your code, the result is garbled code I got, like the following: garbled

Any idea?

WanZhiZheng commented 4 years ago

I came up with the same problem like this,have you solve your problem?

77216384 commented 3 years ago

try opening the datafile by encoding"utf8" like the following with open(path, errors='ignore',encoding='utf8') as f:

as to my puzzle: i split en-zh.txt" randomly to train.txt \dev.txt\test.txt by ratio 8:1:1. i got result like this: Epoch: 02 | Time: 1m 33s Train Loss: 7.127 | Train PPL: 1245.741 Val. Loss: 6.355 | Val. PPL: 575.624 Epoch: 03 | Time: 1m 32s Train Loss: 6.199 | Train PPL: 492.059 Val. Loss: 6.364 | Val. PPL: 580.486 Epoch: 10 | Time: 1m 32s Train Loss: 5.830 | Train PPL: 340.478 Val. Loss: 6.411 | Val. PPL: 608.543 Epoch: 11 | Time: 1m 28s Train Loss: 5.787 | Train PPL: 325.872 Val. Loss: 6.424 | Val. PPL: 616.397 the training loss is going down,but the validing loss is of no changing i try to chang the hidden_size = 64 embed_size = 64

and : hidden_size = 256 embed_size = 512

there was no effect,but the training loss desending faster