pub fn load_policy_from_broadcast<B2, M>(
module: M,
broadcast: &PolicyBroadcast,
device: &B2::Device,
) -> Result<M>Expand description
Deserialize a crate::multi_agent::PolicyBroadcast into module.
The inverse of serialize_policy: decodes the
burn::record::BinBytesRecorder blob and loads it into the given
module (consuming and returning it, per Burn’s move-through record
API). Backend-agnostic — the blob may have been produced on a
different backend with matching element types.
§Errors
Returns an error when the byte blob fails to decode as M’s record.