Skip to content
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

Unknown command line flag 'f' #45

Closed
ghost opened this issue Sep 19, 2019 · 7 comments
Closed

Unknown command line flag 'f' #45

ghost opened this issue Sep 19, 2019 · 7 comments

Comments

@ghost
Copy link

ghost commented Sep 19, 2019

UnrecognizedFlagError                     Traceback (most recent call last)
<ipython-input-3-0b079301697c> in <module>
      1 # Fetch dataset. Scikit-learn already performs some cleaning.
      2 remove = ('headers','footers','quotes')  # (), ('headers') or ('headers','footers','quotes')
----> 3 train = utils.Text20News(data_home=FLAGS.dir_data, subset='train', remove=remove)
      4 
      5 # Pre-processing: transform everything to a-z and whitespace.

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/platform/flags.py in __getattr__(self, name)
     82     # a flag.
     83     if not wrapped.is_parsed():
---> 84       wrapped(_sys.argv)
     85     return wrapped.__getattr__(name)
     86 

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/absl/flags/_flagvalues.py in __call__(self, argv, known_only)
    631       suggestions = _helpers.get_flag_suggestions(name, list(self))
    632       raise _exceptions.UnrecognizedFlagError(
--> 633           name, value, suggestions=suggestions)
    634 
    635     self.mark_as_parsed()

UnrecognizedFlagError: Unknown command line flag 'f'
UnrecognizedFlagError: Unknown command line flag 'f'

make: *** [20news.ipynb] Error 1
@ghost
Copy link
Author

ghost commented Sep 19, 2019

I installed the Ternsorflow and used "make" to run examples

@BingYu94860
Copy link

tf.app.flags.DEFINE_string('f', '', 'kernel')#添加的,不报错

https://blog.csdn.net/qq_33266320/article/details/83548869

@mdeff
Copy link
Owner

mdeff commented Jul 20, 2020

Can you try with tensorflow-gpu==1.1.0 (that's the version I used to develop the code).

@mdeff
Copy link
Owner

mdeff commented Jul 20, 2020

Duplicate of #27.

@mdeff mdeff closed this as completed Jul 20, 2020
@happysheep224
Copy link

happysheep224 commented Aug 7, 2020

UnrecognizedFlagError                     Traceback (most recent call last)
<ipython-input-3-0b079301697c> in <module>
      1 # Fetch dataset. Scikit-learn already performs some cleaning.
      2 remove = ('headers','footers','quotes')  # (), ('headers') or ('headers','footers','quotes')
----> 3 train = utils.Text20News(data_home=FLAGS.dir_data, subset='train', remove=remove)
      4 
      5 # Pre-processing: transform everything to a-z and whitespace.

~/opt/anaconda3/envs/gnn/lib/python3.7/site-packages/tensorflow_core/python/platform/flags.py in __getattr__(self, name)
     82     # a flag.
     83     if not wrapped.is_parsed():
---> 84       wrapped(_sys.argv)
     85     return wrapped.__getattr__(name)
     86 

~/opt/anaconda3/envs/gnn/lib/python3.7/site-packages/absl/flags/_flagvalues.py in __call__(self, argv, known_only)
    631       suggestions = _helpers.get_flag_suggestions(name, list(self))
    632       raise _exceptions.UnrecognizedFlagError(
--> 633           name, value, suggestions=suggestions)
    634 
    635     self.mark_as_parsed()

UnrecognizedFlagError: Unknown command line flag 'HistoryManager.hist_file'
UnrecognizedFlagError: Unknown command line flag 'HistoryManager.hist_file'

@happysheep224
Copy link

what's wrong with it ?

@mdeff
Copy link
Owner

mdeff commented Aug 13, 2020

Please try with tensorflow-gpu==1.1.0 or the solution posted at #27 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants