View source on GitHub
|
Neural network layer for 2D convolution.
Inherits From: Layer, Module, Pytree
oryx.experimental.nn.Conv(
layer_params, name=None
)
Attributes | |
|---|---|
info
|
Returns the info for this Layer.
|
params
|
Returns the parameters of this Layer.
|
state
|
Returns the state of this Layer.
|
Methods
call
call(
*args, **kwargs
)
Calls the Layer's call_and_update and returns the first result.
call_and_update
call_and_update(
*args, rng=None, **kwargs
)
Uses the layer_cau primitive to call `self._call_and_update.
flatten
flatten()
Converts the Layer to a tuple suitable for PyTree.
initialize
@classmethodinitialize( key, in_spec, out_chan, filter_shape, strides=None, padding='VALID', kernel_init=None, bias_init=stax.randn(1e-06), use_bias=True )
Initializes a Layer from an init_key and input specification.
new
@classmethodnew( layer_params, name=None )
Creates Layer given a LayerParams namedtuple.
| Args | |
|---|---|
layer_params
|
LayerParams namedtuple that defines the Layer. |
name
|
a string name for the Layer. |
| Returns | |
|---|---|
A Layer object.
|
replace
replace(
params=None, state=None, info=None
)
Returns a copy of the layer with replaced properties.
spec
@classmethodspec( in_spec, out_chan, filter_shape, strides=None, padding='VALID', kernel_init=None, bias_init=stax.randn(1e-06), use_bias=True )
unflatten
@classmethodunflatten( data, xs )
Reconstruct the Layer from a flattened version.
update
update(
*args, **kwargs
)
Calls the Layer's call_and_update and returns the second result.
variables
variables()
Returns the variables dictionary for this Layer.
__call__
__call__(
*args, **kwargs
) -> Any
Emulates a regular function call.
A Module's dunder call will ensure state is updated after the function
call by calling assign on the updated state before returning the output of
the function.
| Args | |
|---|---|
*args
|
The arguments to the module. |
**kwargs
|
The keyword arguments to the module. |
| Returns | |
|---|---|
| The output of the module. |
View source on GitHub