def entropy_hs(self, H_hat, var_s0_hat, var_s1_hat):

        half = as_floatX(.5)

        one = as_floatX(1.)

        two = as_floatX(2.)

        pi = as_floatX(np.pi)

        for H_hat_v in get_debug_values(H_hat):
            assert H_hat_v.min() >= 0.0
            assert H_hat_v.max() <= 1.0

        term1_plus_term2 = self.entropy_h(H_hat)
        assert len(term1_plus_term2.type.broadcastable) == 1

        term3 = T.sum( H_hat * ( half * (T.log(var_s1_hat) +  T.log(two*pi) + one )  ) , axis= 1)
        assert len(term3.type.broadcastable) == 1

        term4 = T.dot( 1.-H_hat, half * (T.log(var_s0_hat) +  T.log(two*pi) + one ))
        assert len(term4.type.broadcastable) == 1


        for t12, t3, t4 in get_debug_values(term1_plus_term2, term3, term4):
            debug_assert(not contains_nan(t12))
            debug_assert(not contains_nan(t3))
            debug_assert(not contains_nan(t4))

        rval = term1_plus_term2 + term3 + term4

        assert len(rval.type.broadcastable) == 1

        return rval
%latex TEXT - display text as LaTeX
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/s3c.py/S3C.entropy_hs--crossover with--dataset/ETHPy150Open Calysto/metakernel/metakernel/magics/latex_magic.py/LatexMagic.line_latex