(self, leafs, branch_node, layer)
return [branch_node, new_tree]
Append leafs to trunk_layers at the branch_node. If normalize, add a Normalize layer.
Append leafs to trunk_layers at the branch_node. If normalize, add a Normalize layer.
Append leafs to trunk_layers at the branch_node . If normalize add a Normalize layer .
def create_normalize_branch(self, leafs, branch_node, layer):
        """
        Append leafs to trunk_layers at the branch_node. If normalize, add a Normalize layer.
        """

        tree_branch = BranchNode(name=layer + '_norm_branch')
        branch1 = [Normalize(init=Constant(20.0), name=layer + '_norm'),
                   tree_branch, leafs['mbox_loc']]

        branch2 = [tree_branch, leafs['mbox_conf']]
        new_tree = Tree([branch1, branch2])

        return [branch_node, new_tree]
def create_normalize_branch ( self , leafs , branch_node , layer ) : tree_branch = BranchNode ( name = layer + '_norm_branch' ) branch1 = [ Normalize ( init = Constant ( 20.0 ) , name = layer + '_norm' ) , tree_branch , leafs [ 'mbox_loc' ] ] branch2 = [ tree_branch , leafs [ 'mbox_conf' ] ] new_tree = Tree ( [ branch1 , branch2 ] ) return [ branch_node , new_tree ]