如何解决此“ TypeError:__init __()缺少1个必需的位置参数:'deprecated_to_canonical'?

时间:2019-04-22 16:25:01

标签: tensorflow keras

我是Tensorflow的新手,并且关注此tutorial之后,请帮助我解决此问题

我没什么大不了我很清楚为什么会出现这个错误

$ python tfml.py
Traceback (most recent call last):
  File "tfml.py", line 2, in <module>
    import tensorflow as tf
  File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 34, in <module>
    from tensorflow._api.v1 import compat
  File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\_api\v1\compat\__init__.py", line 21, in <module>
    from tensorflow._api.v1.compat import v1
  File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\_api\v1\compat\v1\__init__.py", line 643, in <module>
    'tensorflow_estimator.python.estimator.api._v1.estimator'))
  File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\tools\component_api_helper.py", line 56, in package_hook
    child_pkg = importlib.import_module(child_package_str)
  File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\__init__.py", line 8, in <module>
    from tensorflow_estimator._api.v1 import estimator
  File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\_api\v1\estimator\__init__.py", line 8, in <module>
    from tensorflow_estimator._api.v1.estimator import experimental
  File "C:\Users\rkria\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_estimator\_api\v1\estimator\experimental\__init__.py", line 29, in
<module>
    _sys.modules[__name__], "estimator.experimental")
TypeError: __init__() missing 1 required positional argument: 'deprecated_to_canonical'

0 个答案:

没有答案