das.morpholayers.constraints#
- class das.morpholayers.constraints.Diamond[source]#
Constrains weights to a diamond shape (only for square filters).
- class das.morpholayers.constraints.Disk[source]#
Constrains weights to a disk shape (only for square filters).
- class das.morpholayers.constraints.Lattice[source]#
Constrains weights to be within a lattice range.
- class das.morpholayers.constraints.NonPositive[source]#
Constrains weights to be non-positive values.
- class das.morpholayers.constraints.NonPositiveExtensive[source]#
Constrains weights to be non-positive and centers equal to zero.
- class das.morpholayers.constraints.Rounding(c=4)[source]#
Constrains weights by rounding them to specified decimal places.
- Parameters
c (int) – Number of decimal places for rounding.
- class das.morpholayers.constraints.SEconstraint(SE=array([[0, 1, 0], [1, 1, 1], [0, 1, 0]], dtype=uint8))[source]#
Constrains weights to any structured element (SE) shape.
- das.morpholayers.constraints.rounding_op1(x)[source]#
Round the input tensor to the nearest tenth.
- Parameters
x (tf.Tensor) – Input tensor.
- Returns
Rounded tensor.
- Return type
tf.Tensor
- das.morpholayers.constraints.rounding_op2(x)[source]#
Round the input tensor to the nearest hundredth.
- Parameters
x (tf.Tensor) – Input tensor.
- Returns
Rounded tensor.
- Return type
tf.Tensor