mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 02:58:50 +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);
|
tensor_data.insert(path.to_string(), var);
|
||||||
Ok(tensor)
|
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
|
// 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