Struct border_tch_agent::dqn::DqnModel
source · pub struct DqnModel<Q>where
Q: SubModel<Output = Tensor>,
Q::Config: DeserializeOwned + Serialize + OutDim,{ /* private fields */ }Expand description
Represents value functions for DQN agents.
Implementations§
Trait Implementations§
source§impl<Q> Clone for DqnModel<Q>where
Q: SubModel<Output = Tensor>,
Q::Config: DeserializeOwned + Serialize + OutDim,
impl<Q> Clone for DqnModel<Q>where Q: SubModel<Output = Tensor>, Q::Config: DeserializeOwned + Serialize + OutDim,
source§impl<Q> ModelBase for DqnModel<Q>where
Q: SubModel<Output = Tensor>,
Q::Config: DeserializeOwned + Serialize + OutDim,
impl<Q> ModelBase for DqnModel<Q>where Q: SubModel<Output = Tensor>, Q::Config: DeserializeOwned + Serialize + OutDim,
source§fn backward_step(&mut self, loss: &Tensor)
fn backward_step(&mut self, loss: &Tensor)
Trains the network given a loss.
source§fn get_var_store_mut(&mut self) -> &mut VarStore
fn get_var_store_mut(&mut self) -> &mut VarStore
Returns
var_store as mutable reference.source§fn get_var_store(&self) -> &VarStore
fn get_var_store(&self) -> &VarStore
Returns
var_store.Auto Trait Implementations§
impl<Q> RefUnwindSafe for DqnModel<Q>where Q: RefUnwindSafe,
impl<Q> Send for DqnModel<Q>where Q: Send,
impl<Q> !Sync for DqnModel<Q>
impl<Q> Unpin for DqnModel<Q>where Q: Unpin,
impl<Q> UnwindSafe for DqnModel<Q>where Q: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more