Skip to content

Commit

Permalink
Doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-kidger committed Dec 9, 2023
1 parent ca995ee commit 5926a4e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,6 @@ Julia is often a small amount faster on microbenchmarks on CPUs. JAX+Equinox sup

**You're obviously biased! Are the above comparisons fair?**

Seriously, we think they're fair! Nonetheless all of the above approaches have their adherents, so it seems like all of these approaches are doing something right. So if you're already happily using one of them for your current project... then keep using them. (Don't rewrite things for no reason.) But conversely, we'd invite you to try Equinox for your next project. :)
Seriously, we think they're fair! Nonetheless all of the above approaches have their adherents, so it seems like all of these approaches are doing something right. So if you're already happily using one of them for your current project... then keep using them. (Don't rewrite things for no reason.) But conversely, we'd invite you to try Equinox for your next project.

For what it's worth, if you have the time to learn (e.g. you're a grad student), then we'd strongly recommend trying all of the above. All of these libraries have made substantial innovations, and have all made substantially moved the numerical computing space forward. Equinox deliberately takes inspiration from them!
For what it's worth, if you have the time to learn (e.g. you're a grad student), then we'd strongly recommend trying all of the above. All of these libraries introduced substantial innovations, and in doing so moved the numerical computing space forward. :)
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mkdocs-material==7.3.6 # Theme
pymdown-extensions==9.4 # Markdown extensions e.g. to handle LaTeX.
mkdocstrings==0.17.0 # Autogenerate documentation from docstrings.
mknotebooks==0.7.1 # Turn Jupyter Lab notebooks into webpages.
pytkdocs_tweaks==0.0.7 # Tweaks mkdocstrings to improve various aspects
pytkdocs_tweaks==0.0.8 # Tweaks mkdocstrings to improve various aspects
mkdocs_include_exclude_files==0.0.1 # Tweak which files are included/excluded
jinja2==3.0.3 # Older version. After 3.1.0 seems to be incompatible with current versions of mkdocstrings.
pygments==2.14.0
Expand Down
16 changes: 8 additions & 8 deletions equinox/nn/_sequential.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from collections.abc import Callable, Sequence
from typing import Any, ClassVar, Optional, overload, Union
from typing import Any, Optional, overload, Union

import jax
import jax.random as jr
from jaxtyping import Array, PRNGKeyArray

from .._better_abstract import AbstractClassVar
from .._custom_types import sentinel
from .._module import Module
from ._stateful import State
Expand Down Expand Up @@ -36,7 +37,7 @@ def is_stateful(self) -> bool:
"""
return True

__call__: ClassVar[Callable]
__call__: AbstractClassVar[Callable]


class Sequential(StatefulLayer):
Expand All @@ -50,6 +51,11 @@ class Sequential(StatefulLayer):
layers: tuple

def __init__(self, layers: Sequence[Callable]):
"""**Arguments:**
- `layers`: A sequence of [`equinox.Module`][]s.
"""

self.layers = tuple(layers)

def is_stateful(self) -> bool:
Expand Down Expand Up @@ -119,12 +125,6 @@ def __len__(self):
return len(self.layers)


Sequential.__init__.__doc__ = """**Arguments:**
- `layers`: A sequence of [`equinox.Module`][]s.
"""


class Lambda(Module):
"""Wraps a callable (e.g. an activation function) for use with
[`equinox.nn.Sequential`][].
Expand Down

0 comments on commit 5926a4e

Please sign in to comment.