'Returns L2 loss list of (almost) all variables used inside this block.
When this method needs to be overridden, there are two choices.
1. Override CreateWeightLoss() to change the weight loss of all variables
that belong to this block, both directly and indirectly.
2. Override _CreateWeightLoss() to change the weight loss of all
variables that directly belong to this block but not to the sub-blocks.
Returns:
A Tensor object or None.'

def CreateWeightLoss(self):

    losses = list(itertools.chain(itertools.chain.from_iterable((t.CreateWeightLoss() for t in self._subblocks)), self._CreateWeightLoss()))
    return losses
