コード例 #1
0
def inv_initialize(node: Node, x=None, **kwargs):
    if x is not None:
        node.set_input_dim(x.shape[1])
        node.set_output_dim(x.shape[1])
コード例 #2
0
def fb_initialize(node: Node, x=None, **kwargs):
    node.set_input_dim(x.shape[1])
    node.set_output_dim(x.shape[1])
コード例 #3
0
def on_initialize(node: Node, x=None, y=None):
    if x is not None:
        node.set_input_dim(x.shape[1])
        node.set_output_dim(x.shape[1])
コード例 #4
0
def minus_initialize(node: Node, x=None, **kwargs):
    node.set_input_dim(x.shape[1])
    node.set_output_dim(x.shape[1])
    node.set_param("c", 1)
コード例 #5
0
def sum_initialize(node: Node, x=None, **kwargs):
    if x is not None:
        if isinstance(x, list):
            x = np.concatenate(x, axis=0)
        node.set_input_dim(x.shape[1])
        node.set_output_dim(x.shape[1])