dfbc2057a044a82eba0151ab344e12cd065c5f07,tensorlayer/layers/image_resampling.py,UpSampling2d,build,#UpSampling2d#Any#,68

Before Change


            raise Exception("UpSampling2d tf.image.resize_images only support channel_last")

        // if len(self.inputs.get_shape()) == 3:
        if inputs.shape.ndims == 3:
            if self.is_scale:
                input_shape = inputs.shape.as_list()
                if input_shape[0] is not None:
                    size_h = self.size[0] * input_shape[0]
                else:
                    size_h = self.size[0] * tf.shape(input=inputs)[0]
                if input_shape[1] is not None:
                    size_w = self.size[1] * input_shape[1]
                else:
                    size_w = self.size[1] * tf.shape(input=inputs)[1]
                self.size = [size_h, size_w]

        // elif len(self.inputs.get_shape()) == 4:
        elif inputs.shape.ndims == 4:
            if self.is_scale:
                input_shape = inputs.shape.as_list()
                if input_shape[1] is not None:
                    size_h = self.size[0] * input_shape[1]
                else:
                    size_h = self.size[0] * tf.shape(input=inputs)[1]
                if input_shape[2] is not None:
                    size_w = self.size[1] * input_shape[2]
                else:
                    size_w = self.size[1] * tf.shape(input=inputs)[2]
                self.size = [size_h, size_w]

        else:
            raise Exception("Donot support shape %s" % str(inputs.shape.as_list()))

After Change


            raise Exception("UpSampling2d tf.image.resize_images only support channel_last")

        // if len(self.inputs.get_shape()) == 3:
        if len(inputs_shape) == 3:
            if self.is_scale:
                // input_shape = inputs.shape.as_list()
                if input_shape[0] is not None:
                    size_h = self.size[0] * input_shape[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: dfbc2057a044a82eba0151ab344e12cd065c5f07
Time: 2019-01-15
Author: dhsig552@163.com
File Name: tensorlayer/layers/image_resampling.py
Class Name: UpSampling2d
Method Name: build


Project Name: tensorlayer/tensorlayer
Commit Name: dfbc2057a044a82eba0151ab344e12cd065c5f07
Time: 2019-01-15
Author: dhsig552@163.com
File Name: tensorlayer/layers/image_resampling.py
Class Name: DownSampling2d
Method Name: build


Project Name: tensorlayer/tensorlayer
Commit Name: ab50820c352bef9a551ec6349ad73397c1529cf5
Time: 2019-01-15
Author: dhsig552@163.com
File Name: tensorlayer/layers/dense/dropconnect.py
Class Name: DropconnectDense
Method Name: build