Expose the varmap inner data. (#411)

This commit is contained in:
Laurent Mazare
2023-08-11 17:58:56 +02:00
committed by GitHub
parent 01ea57da8c
commit 55e428c8ae

View File

@ -81,6 +81,10 @@ impl VarMap {
tensor_data.insert(path.to_string(), var);
Ok(tensor)
}
pub fn data(&self) -> &Mutex<HashMap<String, Var>> {
&self.data
}
}
// TODO: Maybe we would want the storage to be generic, e.g. with Box<dyn> to avoid too many