Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
eceb1042
Unverified
Commit
eceb1042
authored
Jul 05, 2021
by
Navjot
Committed by
GitHub
Jul 05, 2021
Browse files
flax.linen.apply takes state as the first param, followed by the input (#12510)
parent
f1c81d6b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/research_projects/jax-projects/README.md
examples/research_projects/jax-projects/README.md
+1
-1
No files found.
examples/research_projects/jax-projects/README.md
View file @
eceb1042
...
...
@@ -621,7 +621,7 @@ state = model_flax.init(rng, dummy_input_ids)
and then we can do the forward pass.
```
python
sequences
=
model_flax
.
apply
(
input_ids
,
state
)
sequences
=
model_flax
.
apply
(
state
,
input_ids
)
```
Visually, the forward pass would now be represented as passing all tensors required for the computation to the model's object:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment