<filename>segmenter/layers/NoisyOr.py
from tensorflow.keras.layers import Multiply


class NoisyOr(Multiply):
    def _merge_function(self, inputs):
        output = 1. - inputs[0]
        for i in range(1, len(inputs)):
            output *= 1. - inputs[i]
        return 1. - output

<filename>segmenter/layers/NoisyOr.py
from tensorflow.keras.layers import Multiply


class NoisyOr(Multiply):
    def _merge_function(self, inputs):
        output = 1. - inputs[0]
        for i in range(1, len(inputs)):
            output *= 1. - inputs[i]
        return 1. - output
