1

The following code snippet is giving error (Graph disconnected: cannot obtain value for tensor):

x = Concatenate (axis = 1) (submodel_outputs)
parallel_layers = Model (inputs = embedding_layers [0] .input, outputs = x)

The value of embedding_layers [0] .get_input_at (0) is equal to:
<tf.Tensor 'embedding_8_input: 0' shape = (?, 100) dtype = float32>

The variable x is the concatenation of 3 models, such as:

  • embedding_8 (Embedding) - (None, 100, 300)
  • dropout_22 (Dropout) - (None, 100, 300)
  • skip_conv1d_22 (SkipConv1D- (None, 100, 100)
  • max_pooling1d_22 (MaxPooling)(None, 25, 100)

I've tried everything, but the error continues. What do I do to make the following line work: parallel_layers = Model (inputs = embedding_layers [0] .input, outputs = x)

Martatcfa
  • 41
  • 2

1 Answers1

0

This error means that your model input and output are not connected. Please paste your full model definition, and this should help others help you.

pitfall
  • 2,531
  • 1
  • 21
  • 21