chenyuntc / pytorch-book

PyTorch tutorials and fun projects including neural talk, neural style, poem writing, anime generation (《深度学习框架PyTorch:入门与实战》)
MIT License
12.01k stars 3.73k forks source link

第九章start_words = opt.start_words.encode('ascii', 'surrogateescape').decode('utf8') #144

Open youth123 opened 5 years ago

youth123 commented 5 years ago

请问,为什么先以ascii码encode,然后使用utf8decode?