b2e6cccd53bd6c076c32421b8c4d562a96437524,tensorlayer/layers/flow_control.py,MultiplexerLayer,__init__,#MultiplexerLayer#Any#Any#,55

Before Change


        //         // tf.reshape(self.outputs, shape=)
        // exit()
        // the same with ConcatLayer
        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_drop = list_remove_repeat(self.all_drop)

After Change


        logging.info("MultiplexerLayer %s: n_inputs:%d" % (self.name, self.n_inputs))

        self.sel = tf.placeholder(tf.int32)
        self.outputs = tf.gather(all_inputs, self.sel, name=name)  // [sel, :, : ...] // 1.2

        // logging.info(self.outputs, vars(self.outputs))
        //         // tf.reshape(self.outputs, shape=)
        // exit()
        // // the same with ConcatLayer
        // 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_drop = list_remove_repeat(self.all_drop)

        self.all_layers.append(self.outputs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 52

Instances


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__


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/flow_control.py
Class Name: MultiplexerLayer
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/stack.py
Class Name: StackLayer
Method Name: __init__