1 2 3 4 5 6 7 8
use crate::prob_distributions::BaseDistribution; use tch::Tensor; pub trait BasePolicy { // return (action, value) fn forward(&self, x: &Tensor) -> (Box<dyn BaseDistribution>, Option<Tensor>); fn is_cuda(&self) -> bool; }