Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YJiangcm committed May 8, 2023
1 parent 676da05 commit be8298e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# coding: UTF-8
# -*- coding: utf-8 -*-
"""
Created on Jan 21 2023
@author: JIANG Yuxin
"""

import torch
from tqdm import tqdm
import time
Expand Down Expand Up @@ -110,4 +115,4 @@ def _to_tensor(self, datas):
arg1_mask = torch.LongTensor([_[10] for _ in datas]).to(self.device)
arg2_mask = torch.LongTensor([_[11] for _ in datas]).to(self.device)

return x, seq_len, mask, token_type, y1_top, y1_sec, y1_conn, y2_top, y2_sec, y2_conn, arg1_mask, arg2_mask
return x, seq_len, mask, token_type, y1_top, y1_sec, y1_conn, y2_top, y2_sec, y2_conn, arg1_mask, arg2_mask

0 comments on commit be8298e

Please sign in to comment.