Last active
March 12, 2018 13:33
-
-
Save wookayin/6ca93b8309f05055c6a3 to your computer and use it in GitHub Desktop.
Reset tensorflow tf.app.flags, in ipython notebook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use the following snippet in your ipython notebook shell | |
import argparse | |
import tensorflow as tf | |
tf.app.flags.FLAGS = tf.python.platform.flags._FlagValues() | |
tf.app.flags._global_parser = argparse.ArgumentParser() |
So where should this call be placed? Doesn't work for me before, after or between initialization and definition of flags.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked for me