-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix issues suggested by codacy. #344
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
|
@luomai @zsdonghao could you help setup the webhook for codacy, instruction is here. |
|
@luomai @zsdonghao when you finish setup the webhook, please reply to this thread, to trigger a comment event. |
|
still not reviewed by codacy, don't merge. |
example/tutorial_mnist.py
Outdated
| # placeholder | ||
| x = tf.placeholder(tf.float32, shape=[None, 784], name='x') | ||
| y_ = tf.placeholder( | ||
| tf.placeholder( |
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 whole statement should be removed, not just y_
y_ = tf.placeholder(
tf.int64, shape=[
None,
], name='y_')
example/tutorial_mnist.py
Outdated
| # Define fine-tune process | ||
| y = network.outputs | ||
| y_op = tf.argmax(tf.nn.softmax(y), 1) | ||
| tf.argmax(tf.nn.softmax(y), 1) |
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.
tf.argmax(tf.nn.softmax(y), 1)
should also be removed
| return | ||
| print("Converting data into %s ..." % filename) | ||
| cwd = os.getcwd() | ||
| # cwd = os.getcwd() |
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.
just delete this line if now used.
| import tensorlayer as tl | ||
| from PIL import Image | ||
| from tensorlayer.layers import * | ||
| """Reimplementation of the TensorFlow official CIFAR-10 CNN tutorials: |
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.
Put before imports @zsdonghao
| EN: https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0#.5m3361vlw | ||
| CN: https://zhuanlan.zhihu.com/p/25710327 | ||
| """ | ||
| # Q-Table learning algorithm, non deep learning - TD Learning, Off-Policy, e-Greedy Exploration |
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.
@zsdonghao put before imports
| from scipy.misc import imread, imresize | ||
| from tensorflow.contrib.slim.python.slim.nets.alexnet import alexnet_v2 | ||
| from tensorflow.contrib.slim.python.slim.nets.inception_v3 import (inception_v3, inception_v3_arg_scope, inception_v3_base) | ||
| # from scipy.misc import imread, imresize |
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.
can we remove this?
* remove two dangerous default values * fix mnist tutorial based on codacy * address hao's comments. * remove unused y_op * hao conv.py * hao prepro.py * hao files.py * remove str statement * hao example mnist * yapf * hao cifar10 * hao inceptionv3 * hao ptb tfrecord image processing * hao tutorials * str comment * str docs * Update README.md * remove unused code * minor fix * small fix
No description provided.