AttributeError: 'Dense' object has no attribute 'outbound_nodes'
See original GitHub issueDescribe the Bug
when run “outputs = keras.layers.Dense(units=2, activation=‘softmax’)(dense)” got error : AttributeError: ‘Dense’ object has no attribute ‘outbound_nodes’
Version Info
- I’m using the latest version
Minimal Codes To Reproduce
import keras_bert
inputs = model.inputs[:2]
dense = model.get_layer('NSP-Dense').output
outputs = keras.layers.Dense(units=2, activation='softmax')(dense)
pass
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Keras + Tensorflow: 'ConvLSTM2D' object has no attribute ...
This fixed AttributeError: 'ConvLSTM2D' object has no attribute 'outbound_nodes'” and then I just used layers.flatten(lstm_layer) and ...
Read more >Keras error: 'Conv2D' object has no attribute 'outbound_nodes'
Hi, I'm trying to run my kernel code where I use layers from a Model and get this error message. 'Conv2D' object has...
Read more >[tensorflow/keras] 'Embedding' object has no attribute ...
[tensorflow/keras] 'Embedding' object has no attribute 'outbound_nodes' solution. I encountered an error while I followed the tutorial about calculating ...
Read more >AttributeError: 'Dense' object has no attribute 'op' - CSDN博客
AttributeError : 'Dense' object has no attribute 'op'SolutionSolution在看keras官方文档application 的finetune模块时1的时候想尝试以下代码块from ...
Read more >Conv2D' object has no attribute 'is_placeholder'
core import Dense, Activation, Lambda, Reshape,Flatten. from keras.layers import Conv2D, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Possible cause:
tensorflow==1.13.2
from tensorflow.python import keras
TF_KERAS=1
is not set properly@Dimesio
That is because one can only use
tf.keras
on TPU. Just useimport keras
and ignoreTF_KERAS
if you don’t know much abouttf.keras
.