1 2 3 4 5 6 7
use tch::{Device, Tensor}; pub trait BaseQFunction { fn forward(&self, x: &Tensor) -> Tensor; fn device(&self) -> Device; fn clone(&self) -> Box<dyn BaseQFunction>; }