JustinLin610
commited on
Commit
•
a929d82
1
Parent(s):
c1aa9ef
Update README.md
Browse files
README.md
CHANGED
@@ -42,10 +42,8 @@ After, refer the path to OFA-base to `ckpt_dir`, and prepare an image for the te
|
|
42 |
|
43 |
>>> # using the generator of fairseq version
|
44 |
>>> model = OFAModel.from_pretrained(ckpt_dir, use_cache=True)
|
45 |
-
>>> generator = sequence_generator.SequenceGenerator(tokenizer=tokenizer,beam_size=5,
|
46 |
-
|
47 |
-
min_len=0,
|
48 |
-
no_repeat_ngram_size=3) # using the generator of fairseq version
|
49 |
>>> data = {}
|
50 |
>>> data["net_input"] = {"input_ids": inputs, 'patch_images': patch_img, 'patch_masks':torch.tensor([True])}
|
51 |
>>> gen_output = generator.generate([model], data)
|
|
|
42 |
|
43 |
>>> # using the generator of fairseq version
|
44 |
>>> model = OFAModel.from_pretrained(ckpt_dir, use_cache=True)
|
45 |
+
>>> generator = sequence_generator.SequenceGenerator(tokenizer=tokenizer,beam_size=5, max_len_b=16,
|
46 |
+
min_len=0, no_repeat_ngram_size=3) # using the generator of fairseq version
|
|
|
|
|
47 |
>>> data = {}
|
48 |
>>> data["net_input"] = {"input_ids": inputs, 'patch_images': patch_img, 'patch_masks':torch.tensor([True])}
|
49 |
>>> gen_output = generator.generate([model], data)
|