Skip to content

Commit

Permalink
"calling_method_name" -> "__call__"
Browse files Browse the repository at this point in the history
  • Loading branch information
ASEM000 committed Sep 8, 2023
1 parent 55191fe commit fdbb33d
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion serket/nn/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class MultiHeadAttention(sk.TreeClass):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``q_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import jax.random as jr
Expand Down
54 changes: 27 additions & 27 deletions serket/nn/convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class Conv1D(ConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -429,7 +429,7 @@ class Conv2D(ConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -524,7 +524,7 @@ class Conv3D(ConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -680,7 +680,7 @@ class FFTConv1D(FFTConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -775,7 +775,7 @@ class FFTConv2D(FFTConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -870,7 +870,7 @@ class FFTConv3D(FFTConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1081,7 +1081,7 @@ class Conv1DTranspose(ConvNDTranspose):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1180,7 +1180,7 @@ class Conv2DTranspose(ConvNDTranspose):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1279,7 +1279,7 @@ class Conv3DTranspose(ConvNDTranspose):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1444,7 +1444,7 @@ class FFTConv1DTranspose(FFTConvNDTranspose):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1543,7 +1543,7 @@ class FFTConv2DTranspose(FFTConvNDTranspose):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1642,7 +1642,7 @@ class FFTConv3DTranspose(FFTConvNDTranspose):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1814,7 +1814,7 @@ class DepthwiseConv1D(DepthwiseConvND):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1896,7 +1896,7 @@ class DepthwiseConv2D(DepthwiseConvND):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -1979,7 +1979,7 @@ class DepthwiseConv3D(DepthwiseConvND):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2115,7 +2115,7 @@ class DepthwiseFFTConv1D(DepthwiseFFTConvND):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2197,7 +2197,7 @@ class DepthwiseFFTConv2D(DepthwiseFFTConvND):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2279,7 +2279,7 @@ class DepthwiseFFTConv3D(DepthwiseFFTConvND):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2431,7 +2431,7 @@ class SeparableConv1D(SeparableConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2528,7 +2528,7 @@ class SeparableConv2D(SeparableConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2625,7 +2625,7 @@ class SeparableConv3D(SeparableConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2722,7 +2722,7 @@ class SeparableFFTConv1D(SeparableConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2819,7 +2819,7 @@ class SeparableFFTConv2D(SeparableConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -2916,7 +2916,7 @@ class SeparableFFTConv3D(SeparableConvND):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -3130,7 +3130,7 @@ class Conv1DLocal(ConvNDLocal):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -3220,7 +3220,7 @@ class Conv2DLocal(ConvNDLocal):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -3310,7 +3310,7 @@ class Conv3DLocal(ConvNDLocal):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down
10 changes: 5 additions & 5 deletions serket/nn/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class Multilinear(sk.TreeClass):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -210,7 +210,7 @@ class Linear(Multilinear):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -289,7 +289,7 @@ class GeneralLinear(sk.TreeClass):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import jax
Expand Down Expand Up @@ -428,7 +428,7 @@ class FNN(sk.TreeClass):
useful when the input shape is not known at initialization time.
To use lazy initialization, add ``None`` as the the first element of the
``layers`` argument and use the ``.at["calling_method_name"]`` attribute
``layers`` argument and use the ``.at["__call__"]`` attribute
to call the layer with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -591,7 +591,7 @@ class MLP(sk.TreeClass):
useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down
8 changes: 4 additions & 4 deletions serket/nn/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class LayerNorm(sk.TreeClass):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``normalized_shape`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -212,7 +212,7 @@ class GroupNorm(sk.TreeClass):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -290,7 +290,7 @@ class InstanceNorm(GroupNorm):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down Expand Up @@ -497,7 +497,7 @@ class BatchNorm(sk.TreeClass):
This is useful when the input shape is not known at initialization time.
To use lazy initialization, pass ``None`` as the ``in_features`` argument
and use the ``.at["calling_method_name"]`` attribute to call the layer
and use the ``.at["__call__"]`` attribute to call the layer
with an input of known shape.
>>> import serket as sk
Expand Down
Loading

0 comments on commit fdbb33d

Please sign in to comment.