DataCollectorBase¶
- class torchrl.collectors.DataCollectorBase[source]¶
Base class for data collectors.
- update_policy_weights_(policy_weights: Optional[TensorDictBase] = None) None [source]¶
Updates the policy weights if the policy of the data collector and the trained policy live on different devices.
- Parameters:
policy_weights (TensorDictBase, optional) – if provided, a TensorDict containing the weights of the policy to be used for the udpdate.