qixun commited on
Commit
b72d014
·
verified ·
1 Parent(s): 9b707b4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -49,8 +49,8 @@ tags:
49
  # 准备输入数据
50
  inputs = tokenizer(text, padding=True, truncation=True, return_tensors="pt", max_length=512)
51
 
52
- # 将输入数据移动到GPU
53
- inputs = {key: value.to(device) for key, value in inputs.items()}
54
 
55
  # 模型推断
56
  with torch.no_grad():
 
49
  # 准备输入数据
50
  inputs = tokenizer(text, padding=True, truncation=True, return_tensors="pt", max_length=512)
51
 
52
+ # GPU可用,将输入数据移动到GPU
53
+ #inputs = {key: value.to(device) for key, value in inputs.items()}
54
 
55
  # 模型推断
56
  with torch.no_grad():