mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 11:08:52 +00:00
Put them back.
This commit is contained in:
@ -156,11 +156,11 @@ impl Tensor {
|
|||||||
// Hiding it from now, having this functions forces us to have *every* function that creates
|
// Hiding it from now, having this functions forces us to have *every* function that creates
|
||||||
// a new tensor potentially `_var` Maybe having something more like `Tensor::ones(..).var()`
|
// a new tensor potentially `_var` Maybe having something more like `Tensor::ones(..).var()`
|
||||||
// might be easier to check.
|
// might be easier to check.
|
||||||
// pub fn ones_var<S: Into<Shape>>(shape: S, dtype: DType, device: &Device) -> Result<Self> {
|
pub fn ones_var<S: Into<Shape>>(shape: S, dtype: DType, device: &Device) -> Result<Self> {
|
||||||
// // Maybe we should allocate some actual storage for vars rather than just using a
|
// Maybe we should allocate some actual storage for vars rather than just using a
|
||||||
// // broadcasted scalar?
|
// broadcasted scalar?
|
||||||
// Self::ones_impl(shape, dtype, device, true)
|
Self::ones_impl(shape, dtype, device, true)
|
||||||
// }
|
}
|
||||||
|
|
||||||
/// Create a new tensors filled with ones with same shape, dtype, and device
|
/// Create a new tensors filled with ones with same shape, dtype, and device
|
||||||
/// as the other tensors
|
/// as the other tensors
|
||||||
@ -208,9 +208,9 @@ impl Tensor {
|
|||||||
Self::zeros_impl(shape, dtype, device, false)
|
Self::zeros_impl(shape, dtype, device, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// pub fn zeros_var<S: Into<Shape>>(shape: S, dtype: DType, device: &Device) -> Result<Self> {
|
pub fn zeros_var<S: Into<Shape>>(shape: S, dtype: DType, device: &Device) -> Result<Self> {
|
||||||
// Self::zeros_impl(shape, dtype, device, true)
|
Self::zeros_impl(shape, dtype, device, true)
|
||||||
// }
|
}
|
||||||
|
|
||||||
/// Create a new tensors filled with ones with same shape, dtype, and device
|
/// Create a new tensors filled with ones with same shape, dtype, and device
|
||||||
/// as the other tensors
|
/// as the other tensors
|
||||||
|
Reference in New Issue
Block a user