merge_operation
Description
Base classes and helper functions for defining logical operations. Main base classes are:
Merge
: Base class for operating on arrays/tensors and booleans, and for building computational trees of such operationsTorchOrNumpyOperation
: BaseMerge
class for operating on numpy or pytorch tensorsMergeBuilder
: A convenience builder class that allows to define custom constructors for a merge class; of interest for easily setting defaults
The logical merging operations derived from Merge
allow for
concatenation of operations. Using them, any operation involving
intersection (AND
),
union (OR
), and
inversion (NOT
)
of masks can be modelled. Scalar values in this case are
treated as all-same-valued masks when mixed with mask tensors.
For further information have a look at the Merge
documentation.
Classes
Base class for operations and operation trees on dictionary inputs. |
|
Return a |
|
Generic merge operation on torch tensors. |
|
Generic merge operation allowing to define both a torch and a numpy operation. |
Functions
|
Broadcast and stack the inputs in dim 0 to enable pixel-wise operations. |