JustinhoCHN / SRGAN_Wasserstein

Apply Waseerstein GAN into SRGAN, a deep learning super resolution model
420 stars 102 forks source link

flake8 finds 14 undefined names #2

Closed cclauss closed 6 years ago

cclauss commented 6 years ago

flake8 testing of https://github.com/JustinhoCHN/SRGAN_Wasserstein on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./tensorlayer/cost.py:353:7: F821 undefined name 'logging'
      logging.info('Scale of 0 disables regularizer.')
      ^
./tensorlayer/cost.py:408:7: F821 undefined name 'logging'
      logging.info('Scale of 0 disables regularizer.')
      ^
./tensorlayer/cost.py:461:7: F821 undefined name 'logging'
      logging.info('Scale of 0 disables regularizer.')
      ^
./tensorlayer/cost.py:510:7: F821 undefined name 'logging'
      logging.info('Scale of 0 disables regularizer.')
      ^
./tensorlayer/cost.py:559:7: F821 undefined name 'logging'
      logging.info('Scale of 0 disables regularizer.')
      ^
./tensorlayer/layers.py:265:56: F821 undefined name 'name_reuse'
        if (name in set_keep['_layers_name_list']) and name_reuse == False:
                                                       ^
./tensorlayer/layers.py:5683:49: F821 undefined name 'single_cell'
            cell = tf.contrib.rnn.MultiRNNCell([single_cell] * num_layers)
                                                ^
./tensorlayer/layers.py:5685:49: F821 undefined name 'single_cell'
            cell = tf.nn.rnn_cell.MultiRNNCell([single_cell] * num_layers)
                                                ^
./tensorlayer/layers.py:5933:34: F821 undefined name 'W'
        self.all_params.extend( [W, b] )
                                 ^
./tensorlayer/layers.py:5933:37: F821 undefined name 'b'
        self.all_params.extend( [W, b] )
                                    ^
./tensorlayer/prepro.py:941:11: F821 undefined name 'flatx'
    print(flatx.shape)  # (160, 176, 1)
          ^
./tensorlayer/prepro.py:942:21: F821 undefined name 'flatx'
    whitex = np.dot(flatx, principal_components)
                    ^
./tensorlayer/prepro.py:1001:8: F821 undefined name 'is_random'
    if is_random:
       ^
./tensorlayer/prepro.py:1255:25: F821 undefined name 'image'
    x = binary_dilation(image, selem=mask)
                        ^
14    F821 undefined name 'logging'
14
JustinhoCHN commented 6 years ago

Thanks for the commit, and I suggest you to commit this in the original repo:https://github.com/tensorlayer/srgan, this is tensorlayer underlying code, the authors would like to see it.

cclauss commented 6 years ago

@JustinhoCHN The tensorlayer/stgan repo passes these same flake8 tests with no errors.

JustinhoCHN commented 6 years ago

merged,thank you