activations
ComplexActivation ¶
1 2 3 |
|
Bases: tf.keras.layers.Layer
Wrapper to apply a given activation
to a complex input individually for the real and imaginary part.
Example:
1 2 3 4 5 6 7 8 9 10 |
|
Initialize ComplexActivation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
activation |
tf.keras.layers.Layer
|
Activation function to complexyfy. |
required |
kwargs |
Any
|
keyword arguments passed to the parent class tf.keras.layers.Layer. |
{}
|
Source code in DeepSaki/activations/complex_valued_activations.py
24 25 26 27 28 29 30 31 32 |
|
call ¶
1 |
|
Splits its intput inputs
into a real and imaginary part, applies activation
and constructs a complex number.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inputs |
tf.Tensor
|
Input tensor to be activated. Might be a complex or real valued tensor. |
required |
Returns:
Type | Description |
---|---|
tf.Tensor
|
Complex-valued tensor with activated real and imaginary part. |
Source code in DeepSaki/activations/complex_valued_activations.py
34 35 36 37 38 39 40 41 42 43 44 45 |
|
get_config ¶
1 |
|
Returns configuration of class instance.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict[str,Any]: Dictionary containing the class' configuration. |
Source code in DeepSaki/activations/complex_valued_activations.py
47 48 49 50 51 52 53 54 55 |
|