"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "31d01150add8a93c379352ea048f3494ce18c39d"
Unverified Commit 934222e3 authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

[FLax] Fix marian docs 2 (#12615)

* fix_torch_device_generate_test

* remove @

* up
parent 165606e5
...@@ -55,7 +55,7 @@ Tips ...@@ -55,7 +55,7 @@ Tips
>>> input_ids = tokenizer(text, max_length=64, return_tensors='jax').input_ids >>> input_ids = tokenizer(text, max_length=64, return_tensors='jax').input_ids
>>> # Marian has to make use of early_stopping=True >>> # Marian has to make use of early_stopping=True
>>> sequences = model.generate(inputs, early_stopping=True, max_length=64, num_beams=2).sequences >>> sequences = model.generate(input_ids, early_stopping=True, max_length=64, num_beams=2).sequences
Naming Naming
......
...@@ -1466,7 +1466,7 @@ FLAX_MARIAN_MT_DOCSTRING = """ ...@@ -1466,7 +1466,7 @@ FLAX_MARIAN_MT_DOCSTRING = """
>>> input_ids = tokenizer(text, max_length=64, return_tensors='jax').input_ids >>> input_ids = tokenizer(text, max_length=64, return_tensors='jax').input_ids
>>> # Marian has to make use of early_stopping=True >>> # Marian has to make use of early_stopping=True
>>> sequences = model.generate(inputs, early_stopping=True, max_length=64, num_beams=2).sequences >>> sequences = model.generate(input_ids, early_stopping=True, max_length=64, num_beams=2).sequences
>>> outputs = tokenizer.batch_decode(sequences, skip_special_tokens=True) >>> outputs = tokenizer.batch_decode(sequences, skip_special_tokens=True)
>>> # should give `Meine Freunde sind cool, aber sie essen zu viele Kohlenhydrate.` >>> # should give `Meine Freunde sind cool, aber sie essen zu viele Kohlenhydrate.`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment