-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fixed unused code, error prone and code style #352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
raise not implemented error instead of pass
example/tutorial_vgg16.py
Outdated
|
|
||
| def conv_layers_simple_api(net_in): | ||
| with tf.name_scope('preprocess') as scope: | ||
| with tf.name_scope('preprocess'): # as scope: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove # as scope
example/tutorial_vgg16.py
Outdated
|
|
||
| def conv_layers_simple_api(net_in): | ||
| with tf.name_scope('preprocess') as scope: | ||
| with tf.name_scope('preprocess'): # as scope: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this comment as users may compensate as a description.
tensorlayer/layers/core.py
Outdated
| logging.info("EmbeddingInputlayer %s: (%d, %d)" % (self.name, vocabulary_size, embedding_size)) | ||
|
|
||
| with tf.variable_scope(name) as vs: | ||
| with tf.variable_scope(name): # as vs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
tensorlayer/layers/extend.py
Outdated
|
|
||
| logging.info("TileLayer %s: multiples:%s" % (self.name, multiples)) | ||
| with tf.variable_scope(name) as vs: | ||
| with tf.variable_scope(name): # as vs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
tensorlayer/layers/merge.py
Outdated
| for l in layers[1:]: | ||
| assert str(self.outputs.get_shape()) == str( | ||
| l.outputs.get_shape()), "Hint: the input shapes should be the same. %s != %s" % (self.outputs.get_shape(), str(l.outputs.get_shape())) | ||
| # assert str(self.outputs.get_shape()) == str( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
tensorlayer/layers/recurrent.py
Outdated
| outputs = tf.concat(2, outputs) | ||
| if return_last: | ||
| # [batch_size, 2 * n_hidden] | ||
| raise Exception("Do not support return_last at the moment") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we actually remove this parameter from the interface?
tensorlayer/layers/stack.py
Outdated
| """ | ||
| inputs = layer.outputs | ||
| with tf.variable_scope(name) as vs: | ||
| with tf.variable_scope(name): # as vs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
| net_new = Layer(inputs, name=whole_name) | ||
| # with tf.name_scope(name): | ||
| with tf.variable_scope(name) as vs: | ||
| with tf.variable_scope(name): # as vs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
tensorlayer/prepro.py
Outdated
| for i in range(len(annotations)): | ||
| class_list.append(annotations[i][0]) | ||
| bbox_list.append(annotations[i][1:]) | ||
| # for i in range(len(annotations)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments
tensorlayer/utils.py
Outdated
| elif _platform == "win32": | ||
| logging.info(text2 + "Windows") | ||
| # TODO | ||
| raise NotImplementedError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to add a string telling "this function is not supported on the Windows platform"
tensorlayer/utils.py
Outdated
| elif _platform == "win32": | ||
| logging.info('Windows%s' % text2) | ||
| # TODO | ||
| raise NotImplementedError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same as above
tensorlayer/layers/core.py
Outdated
| """ | ||
| y = [] | ||
| [y.append(i) for i in x if not i in y] | ||
| # [y.append(i) for i in x if not i in y] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the comment
tensorlayer/layers/recurrent.py
Outdated
| output_keep_prob=out_keep_prob if is_last else 1.0) # out_keep_prob) | ||
| else: | ||
| cell_creator = lambda: rnn_creator() | ||
| # cell_creator = lambda: rnn_creator() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
tensorlayer/nlp.py
Outdated
| # assert batch_size % num_skips == 0 | ||
| if batch_size % num_skips != 0: | ||
| raise Exception("batch_size should be able to be divided by num_skips.") | ||
| # assert num_skips <= 2 * skip_window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
tensorlayer/nlp.py
Outdated
| assert batch_size % num_skips == 0 | ||
| assert num_skips <= 2 * skip_window | ||
|
|
||
| # assert batch_size % num_skips == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
tensorlayer/nlp.py
Outdated
| logging.info('Limited vocabulary size {}'.format(vocabulary_size)) | ||
| assert len(collections.Counter(words).keys()) >= vocabulary_size, \ | ||
| "the limited vocabulary_size must be less than or equal to the read vocabulary_size" | ||
| # assert len(collections.Counter(words).keys()) >= vocabulary_size, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
* raise not implemented error instead of pass * fix unused code * fix pylint issues. * fixed some assert error * fixed unused code * fixed all error prone * fixed most of the code style * yapf * yapf tests * fixed suggestion * yapf * remove unused code * remove unused code * fix
Uh oh!
There was an error while loading. Please reload this page.