b2e6cccd53bd6c076c32421b8c4d562a96437524,tensorlayer/layers/stack.py,StackLayer,__init__,#StackLayer#,21

Before Change



        logging.info("StackLayer %s: axis: %d" % (self.name, axis))

        self.all_layers = list(layers[0].all_layers)
        self.all_params = list(layers[0].all_params)
        self.all_drop = dict(layers[0].all_drop)

        for i in range(1, len(layers)):
            self.all_layers.extend(list(layers[i].all_layers))
            self.all_params.extend(list(layers[i].all_params))
            self.all_drop.update(dict(layers[i].all_drop))

        self.all_layers = list_remove_repeat(self.all_layers)
        self.all_params = list_remove_repeat(self.all_params)


def unstack_layer(layer, num=None, axis=0, name="unstack"):
    

After Change


        for l in layers:
            self.inputs.append(l.outputs)

        self.outputs = tf.stack(self.inputs, axis=axis, name=name)

        logging.info("StackLayer %s: axis: %d" % (self.name, axis))

        // self.all_layers = list(layers[0].all_layers)
        // self.all_params = list(layers[0].all_params)
        // self.all_drop = dict(layers[0].all_drop)
        //
        // for i in range(1, len(layers)):
        //     self.all_layers.extend(list(layers[i].all_layers))
        //     self.all_params.extend(list(layers[i].all_params))
        //     self.all_drop.update(dict(layers[i].all_drop))
        //
        // self.all_layers = list_remove_repeat(self.all_layers)
        // self.all_params = list_remove_repeat(self.all_params)

        self.all_layers.append(self.outputs)


def unstack_layer(layer, num=None, axis=0, name="unstack"):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 44

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: b2e6cccd53bd6c076c32421b8c4d562a96437524
Time: 2018-03-10
Author: dhsig552@163.com
File Name: tensorlayer/layers/stack.py
Class Name: StackLayer
Method Name: __init__


Project Name: tensorlayer/tensorlayer
Commit Name: b2e6cccd53bd6c076c32421b8c4d562a96437524
Time: 2018-03-10
Author: dhsig552@163.com
File Name: tensorlayer/layers/merge.py
Class Name: ConcatLayer
Method Name: __init__


Project Name: tensorlayer/tensorlayer
Commit Name: b2e6cccd53bd6c076c32421b8c4d562a96437524
Time: 2018-03-10
Author: dhsig552@163.com
File Name: tensorlayer/layers/merge.py
Class Name: ElementwiseLayer
Method Name: __init__


Project Name: tensorlayer/tensorlayer
Commit Name: b2e6cccd53bd6c076c32421b8c4d562a96437524
Time: 2018-03-10
Author: dhsig552@163.com
File Name: tensorlayer/layers/flow_control.py
Class Name: MultiplexerLayer
Method Name: __init__