chore: 移除冗余代码行以提高可读性
This commit is contained in:
commit
8b0beeb56c
2
test.py
2
test.py
|
|
@ -80,11 +80,11 @@ sample = {
|
|||
"pinyin_ids": pinyin_ids,
|
||||
}
|
||||
|
||||
|
||||
model = InputMethodEngine(pinyin_vocab_size=30, compile=False)
|
||||
|
||||
checkpoint = torch.load("/home/songsenand/下载/best_model.pt", map_location="cpu")
|
||||
model.load_state_dict(checkpoint["model_state_dict"])
|
||||
|
||||
input_ids = sample["input_ids"]
|
||||
token_type_ids = sample["token_type_ids"]
|
||||
attention_mask = sample["attention_mask"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue