# How to have completely separate recurrent value function model?

**URL:** <https://discuss.ray.io/t/how-to-have-completely-separate-recurrent-value-function-model/20610>\
**Category:** RLlib\
**Created:** [November 14, 2024, 10:45pm UTC](https://discuss.ray.io/t/how-to-have-completely-separate-recurrent-value-function-model/20610 "2024-11-14T22:45:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwijesundara](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@cwijesundara](https://discuss.ray.io/u/cwijesundara)\
**Post date:** [November 14, 2024, 10:45pm UTC](https://discuss.ray.io/t/how-to-have-completely-separate-recurrent-value-function-model/20610/1 "2024-11-14T22:45:33Z")

</div>

Hello! I was looking at the rllib code for initializing a recurrent model here: [ray/rllib/models/torch/recurrent\_net.py at ray-2.9.3 · ray-project/ray · GitHub](https://github.com/ray-project/ray/blob/ray-2.9.3/rllib/models/torch/recurrent_net.py)

As far as I can see in this code however, the value function and the policy network both share the same recurrent layers and hidden states. How do I set up a completely separate value function that is learning its own recurrent hidden states and is not re-using any features from the policy network?
