code: @Override
      public Beliefs forward() {
          Tensor dep = depIn.getOutput();
          int n = dep.getDims()[1];
          Beliefs origB = inf.getOutput();
          y = new Beliefs(s);
          y.varBeliefs = new VarTensor[origB.varBeliefs.length];
          y.facBeliefs = new VarTensor[0];
          
          for (int v=0; v<origB.varBeliefs.length; v++) {
              Var var = origB.varBeliefs[v].getVars().get(0);
              if (var instanceof LinkVar) {
                  LinkVar link = (LinkVar) var;
                  int p = link.getParent();
                  int c = link.getChild();
                  int pp = EdgeScores.getTensorParent(p, c);
                  assert p < n && c < n;
                  
                  // Initialize the belief tensor.
                  y.varBeliefs[v] = new VarTensor(s, origB.varBeliefs[v].getVars(), s.zero());
                  // Set the marginal b(e_{p,c} = True) and b(e_{p,c} = False).
                  y.varBeliefs[v].setValue(LinkVar.TRUE, dep.get(pp, c));
                  y.varBeliefs[v].setValue(LinkVar.FALSE, s.minus(s.one(), dep.get(pp, c)));
              }
          }
          return y;
      }
docs: Forward pass:
  b(e_{p,c} = True) = d_{p,c}
  b(e_{p,c} = False) = 1.0 - d_{p,c}
  
  Abbreviated:
  t_i = m_i
  f_i = 1.0 - m_i