AttributeError: module 'tensorflow' has no attribute 'compat' when loading tf.compat.v1.train.SessionRunHook

前端 未结 4 463
别跟我提以往
别跟我提以往 2020-12-31 11:46

I can see that this question has been asked before here tensorflow-has-no-attribute-compat

but the answer given was to

Microsoft Visual C++ 2015-2019 R         


        
4条回答
  •  没有蜡笔的小新
    2020-12-31 12:36

    Special note for Conda users:

    When one enters conda install tensorflow it installs 2.1.0 but it brings with it tensorflow-estimator 2.2.0. To fix this problem simply run conda install tensorflow-estimator==2.1.0 after installing tensorflow 2.1.0 in Conda.

    This advice is valid until conda switches to TF 2.2.0 (or better yet to 2.3.0)

    credits to this TF github thread

    UPDATE: as of 10-Dec-2020 Conda has TF 2.3.0 for Windows and 2.2.0 for Linux. Check here to see current state of TF support in Conda.

提交回复
热议问题