Skip to content

Commit e715153

Browse files
committed
fix nlp_getter f format
1 parent adadf10 commit e715153

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

graph_net/test/nlp_model_getter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ def get_albert_model_and_inputs(model_name, text, dtype):
229229
if tokenizer.pad_token is None:
230230
tokenizer.pad_token = tokenizer.unk_token
231231

232-
# 4) 构造输入(支持 str 或 List[str])
233232
enc = tokenizer(
234233
text,
235234
return_tensors="pd",
@@ -238,7 +237,6 @@ def get_albert_model_and_inputs(model_name, text, dtype):
238237
max_length=512,
239238
)
240239

241-
# 显式补 attention_mask(pad 处为 0)
242240
if "attention_mask" not in enc:
243241
input_ids = enc["input_ids"]
244242
enc["attention_mask"] = (input_ids != tokenizer.pad_token_id).astype("int64")

0 commit comments

Comments
 (0)