Пример #1
0
def _set_motifs(edge, motifs, c):
    """
    Set l-1 level motifs as ops at the edges for l level motifs
    """
    op = []
    for motif in motifs:
        m = motif.copy()    # We need copies because they will be set at every edge
        m.nodes[4]['comb_op'] = ops.Concat1x1(num_in_edges=3, C_out=c)
        op.append(m)
    
    edge.data.set('op', op)
Пример #2
0
def _set_comb_op_channels(node, in_edges, out_edges, c):
    index, n = node
    if index == 4:
        n['comb_op'] = ops.Concat1x1(num_in_edges=3, C_out=c)
Пример #3
0
 def set_comb_op(node, in_edges, out_edges, C):
     if node[0] == out_node_idx:
         node[1]['comb_op'] = ops.Concat1x1(
             num_in_edges=intermediate_nodes, C_out=C)