Update dataset.py

master
KyuSeok Jung 3 years ago committed by GitHub
parent 0959907f87
commit b19af67d29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -99,7 +99,7 @@ class PersonalizedBase(Dataset):
text = random.choice(self.lines)
text = text.replace("[name]", self.placeholder_token)
tags = filename_text.split(',')
if shared.opt.tag_drop_out != 0:
if shared.opts.tag_drop_out != 0:
tags = [t for t in tags if random.random() > shared.opt.tag_drop_out]
if shared.opts.shuffle_tags:
random.shuffle(tags)

Loading…
Cancel
Save