Apprently from the tutorial code LogisticEndpoint takes two input, namely the return value of dense and targets. However in the plot, a link from target:InputLayer
to predictions:LogisticEndpoint
is missing.
How would I revise the tutorial code so that plot is correct?
CodePudding user response:
Inputs to your custom layer should be a list/tuple for two input tensors and not two separate inputs. Check the
CodePudding user response:
Your logits are only taking the input. You are not putting in the targets for the network to consider it as a layer. You can concatenate them, and that will make them show up in the plot_model function.
inputs = keras.Input(shape=(3,), name="inputs")
targets = keras.Input(shape=(10,), name="targets")
concat = tf.keras.layers.Concatenate()([inputs, targets])
logits = keras.layers.Dense(10)(concat)