【问题标题】:AttributeError: module 'keras.layers' has no attribute 'Wrapper'AttributeError:模块 'keras.layers' 没有属性 'Wrapper'
【发布时间】:2020-11-21 03:25:03
【问题描述】:

发生此错误的原因是我使用了from astroNN.models import Galaxy10CNN 并将 Tensorflow 降级到 1.15.2 以防止出现ImportError: cannot import name 'get_default_session',但看到与属性“Wrapper”相关的新错误AttributeError: module 'keras.layers' has no attribute 'Wrapper'

请指教。谢谢!

【问题讨论】:

    标签: tensorflow keras deep-learning conv-neural-network astronomy


    【解决方案1】:

    使用 Tensorflow 1.15 中的 keras.layers.wrapper 作为

    import tensorflow as tf
    tf.keras.layers.Wrapper(layer, **kwargs)
    

    有关该库的更多详细信息,请查找here

    【讨论】:

      猜你喜欢
      • 2019-09-09
      • 2018-04-14
      • 2019-02-18
      • 1970-01-01
      • 2020-01-01
      • 2019-07-20
      • 2021-11-05
      • 2021-11-04
      相关资源
      最近更新 更多