mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 03:28:50 +00:00
Make func cloneable. (#1137)
This commit is contained in:
@ -44,7 +44,7 @@ impl Sequential {
|
||||
/// Appends a closure after all the current layers.
|
||||
pub fn add_fn<F>(self, f: F) -> Self
|
||||
where
|
||||
F: 'static + Fn(&Tensor) -> Result<Tensor> + Send,
|
||||
F: 'static + Fn(&Tensor) -> Result<Tensor> + Send + Sync,
|
||||
{
|
||||
self.add(super::func(f))
|
||||
}
|
||||
|
Reference in New Issue
Block a user