-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Remove the use of global variables. #388
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
tensorlayer/layers/core.py
Outdated
| """ | ||
| LayersConfig._layer_name_list = [] | ||
| raise NotImplementedError('TensorLayer relies on TensorFlow to check naming. Remove this function call.') |
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 not to raise exception here to provide better user experience.
We can do something like
logging.info('this method is DEPRECATED and has no effect, please remove it from your code.')
In that way we can inform users without crashing their code.
| """ | ||
| LayersConfig._name_reuse = enable | ||
| logging.warning('this method is DEPRECATED and has no effect, please remove it from your code.') |
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.
Actually Hao was right, use pass should be enough, because TensorFlow would log the warning.
And I think this code will crash because we don't have a warning method on logging yet.
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.
I see the warning method was added later, then it's fine here.
|
|
||
| # train the network | ||
| tl.utils.fit( | ||
| sess, network, train_op, cost, X_train, y_train, x, y_, acc=acc, batch_size=500, n_epoch=3, print_freq=1, X_val=X_val, y_val=y_val, eval_train=False) |
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 reduce the model size instead?
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.
yes, just do
* fixed bug of time distributed layer and release 2 tests * speed up test mnist * fixed test file name * remove unused code
No description provided.