mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Expose the varmap inner data. (#411)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user