Update utils.py

This commit is contained in:
XXXXRT666 2024-05-03 01:08:22 +01:00 committed by GitHub
parent fb4220a96a
commit e62c035c96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -208,7 +208,7 @@ def make_reject_y(y_o, y_lens):
bs = len(y_lens) bs = len(y_lens)
reject_y = [] reject_y = []
reject_y_lens = [] reject_y_lens = []
proportion=0.9 # repeat/total proportion=0.5 # repeat/total
for b in range(bs): for b in range(bs):
process_item_idx = torch.rand(1) process_item_idx = torch.rand(1)
if process_item_idx < proportion: if process_item_idx < proportion: