You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if is_interactive_notebook():
# global variables used later in the script
spacy_de, spacy_en = show_example(load_tokenizers)
vocab_src, vocab_tgt = show_example(load_vocab, args=[spacy_de, spacy_en])” 引入的UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 37: invalid start byte问题的?
The text was updated successfully, but these errors were encountered:
请问你是怎么解决“def build_vocabulary(spacy_de, spacy_en):
def tokenize_de(text):
return tokenize(text, spacy_de)
train, val, test = datasets.Multi30k(language_pair=("de", "en"))
train, val, test = datasets.Multi30k(language_pair=("de", "en"))
def load_vocab(spacy_de, spacy_en):
if not exists("vocab.pt"):
vocab_src, vocab_tgt = build_vocabulary(spacy_de, spacy_en)
torch.save((vocab_src, vocab_tgt), "vocab.pt")
else:
vocab_src, vocab_tgt = torch.load("vocab.pt")
print("Finished.\nVocabulary sizes:")
print(len(vocab_src))
print(len(vocab_tgt))
return vocab_src, vocab_tgt
if is_interactive_notebook():
# global variables used later in the script
spacy_de, spacy_en = show_example(load_tokenizers)
vocab_src, vocab_tgt = show_example(load_vocab, args=[spacy_de, spacy_en])” 引入的UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 37: invalid start byte问题的?
The text was updated successfully, but these errors were encountered: