Skip to content

Commit

Permalink
Merge pull request #1978 from melissatan:docs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 436510479
  • Loading branch information
Flax Authors committed Mar 22, 2022
2 parents 049096b + 5f8c5f9 commit e16cf72
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flax/linen/combinators.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ class Foo(nn.Module):
@nn.compact
def __call__(self, x):
return nn.Sequential([nn.Dense(layer_size, name=f'layers_{idx}')
for idx, layer_size
in enumerate(self.feature_sizes)])(x)
return nn.Sequential([nn.Dense(4),
nn.relu,
nn.Dense(2),
nn.log_softmax])(x)
"""
layers: Sequence[Callable[..., Any]]

Expand Down

0 comments on commit e16cf72

Please sign in to comment.