Open AndrewLischishin opened 6 years ago
i also stuck this problem,and not solve it still now.
So, this problem is also discussed here, and it pops out because of using jupyter notebook. In order to be able to run mnist.py(or any other) just convert the .ipynb file into .py, for example with this:
$ jupyter nbconvert --to script [YOUR_NOTEBOOK].ipynb
then you can just normally execute with:
python<version> file.py
if some matplotlib problems pop out check this, maybe it will answer your questions, or this. I am using MacBook Pro 2014mid, macOS High Sierra, Version 10.13.3, python 3.6.4, tensorflow 1.6.0. and I didn't instal tensorflow-gpu from requirements.txt(brought some errors in). The first solution worked for me, when the second one just brought some blocking while executing. If someone found other, more simple, solution or maybe it is just correct as it is, please comment.
I am facing the same issue, after converting to .py file there are lots of errors to resolve. Isn't there a way to fix this in jupyter notebook only?
To anyone having this issue in the notebook, add tf.app.flags.DEFINE_string('f', '', 'kernel')
before defining your flags.
E.g. for rcv1
flags = tf.app.flags
FLAGS = flags.FLAGS
#
tf.app.flags.DEFINE_string('f', '', 'kernel')
# Graphs.
flags.DEFINE_integer('number_edges', 16, 'Graph: minimum number of edges per vertex.')
flags.DEFINE_string('metric', 'cosine', 'Graph: similarity measure (between features).')
# TODO: change cgcnn for combinatorial Laplacians.
flags.DEFINE_bool('normalized_laplacian', True, 'Graph Laplacian: normalized.')
flags.DEFINE_integer('coarsening_levels', 0, 'Number of coarsened graphs.')
flags.DEFINE_string('dir_data', os.path.join('data', 'rcv1'), 'Directory to store data.')
flags.DEFINE_integer('val_size', 400, 'Size of the validation set.')
That's probably due to a TensorFlow update. The original code should work with tensorflow-gpu==1.1.0
(the version I used to develop the code).
If the fix (adding tf.app.flags.DEFINE_string('f', '', 'kernel')
) also works with tensorflow-gpu==1.1.0
I'd accept a PR.
Hi there! I've tried for a while to run your code, but still have some flag problems, so here what I get:
this is what I get if I just 'make' in nips2016:
I tried to solve it myself and what I found was, that tensorflow uses now absl for flags, so I tried to do this:
instead of
but still get another error
So, maybe I just overlook something, but still stuck in it.