# In DQN, would it be cheaper to have $N$ neural networks with a single real-valued output, one for each of the $N$ actions?

In the classical examples of deep q-learning, I often see neural networks in which the input represents the state of the agent, while the output is a tuple with all the values of $$Q(s, a)$$ predicted for all the possible $$N$$ actions.

Would it be cheaper to have $$N$$ neural networks with a single real-valued output, one for each of the $$N$$ actions?

With cheaper I mean cheaper in terms of the time complexity of a single training step of the network.

• Hello. I tried to clarify your question. Make sure that I didn't change the meaning of the post. Please, could you also clarify what you mean by "cheaper"? Cheaper in terms of what? – nbro Apr 28 at 10:04
• Hi, thank you. The meaning is the same. With "cheaper" I mean cheaper in terms of operations required. – Antonio Sannia Apr 28 at 13:21
• Please, edit your post to clarify what you mean by "cheap". In terms of operations, do you mean the time complexity of one iteration of training DQN as described in the original paper? – nbro Apr 29 at 10:27
• Yes, I mean that. I have edited. – Antonio Sannia Apr 29 at 20:18
• But, if that's what you mean, why did you accept the answer below? It doesn't really answer your question (which was not specific enough indeed). You should discuss your edited version with the author of that answer. – nbro Apr 29 at 22:27

Would it be cheaper to have $$N$$ neural networks with a single real-valued output, one for each of the $$N$$ actions?