mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 19:47:12 +00:00
Add some epsilon tolerance to grad tests so that they work on cuda / mkl. (#213)
This commit is contained in:
@ -482,6 +482,11 @@ impl Tensor {
|
||||
}
|
||||
}
|
||||
|
||||
/// An alias for `to_scalar`.
|
||||
pub fn to_vec0<S: crate::WithDType>(&self) -> Result<S> {
|
||||
self.to_scalar::<S>()
|
||||
}
|
||||
|
||||
/// This operation multiplies the input tensor by `mul` then adds `add` and return the result.
|
||||
/// The input values `mul` and `add` are casted to the appropriate type so some rounding might
|
||||
/// be performed.
|
||||
|
Reference in New Issue
Block a user