logo
Loading...

出現module 'tensorflow' has no attribute 'get_default_graph' 錯誤 - Cupoy

執行 homework 的檔案,就遇到以下 Error,請問如何解決?AttributeError ...

ml100-2,ml100-2-d68, build

出現module 'tensorflow' has no attribute 'get_default_graph' 錯誤

2019/11/15 03:19 AM
機器學習新手論壇
Jeng Daw Li
觀看數:0
回答數:2
收藏數:0
ml100-2
ml100-2-d68
build

執行 homework 的檔案,就遇到以下 Error,請問如何解決?


AttributeError                            Traceback (most recent call last)
<ipython-input-9-ba070084bc2c> in <module>
     1 # build our CNN model, 多加幾層
----> 2 model = Sequential()
     3 model.add(Conv2D(64, (3, 3), padding='same',
     4                  input_shape=x_train.shape[1:]))
     5 model.add(Flatten())

.................................................


AttributeError: module 'tensorflow' has no attribute 'get_default_graph'


Thanks,

Roger