Reputation: 788
The Actor-network has 5 input neurons representing the state values and will produce one output value held by one output neuron.
The Q Network has 6 input neurons: 5 representing the state values and 1 representing the output of Actor-network.
I'll do gradient descent to train the Actor-network seperately, holding Q network's weights as constant.
My question is: How should I structure to plug the output layer of Actor-Network into the input layer of the Q network, with TensorFlow 2.x?
Upvotes: 0
Views: 1296
Reputation: 2744
You can just use the ŧf.keras.Model
API:
actor_model = tf.keras.Model(inputs=...,outputs=...)
Q_model = tf.keras.Model(inputs=actor_model.outputs, outputs=...)
Upvotes: 3